kylemcdonald / ofxFft

FFT addon for openFrameworks that wrapps FFTW and KissFFT.
141 stars 46 forks source link

expected constant expression error #5

Open fiongogo opened 10 years ago

fiongogo commented 10 years ago

when i use it in vs2012,there is a error like this error C2057: expected constant expression so i change float avgCol[numFFTbins]; to float *avgCol= new float[numFFTbins];

it's ok.

Is it bug?

bsubei commented 9 years ago

@fiongogo (I'm not an expert here at all)

the array avgCol isn't used anywhere in the code... I don't think it even does anything.

In your case, you're allocating it on the heap (using the keyword new), and it's not being freed anywhere (memory might leak).