Article 53MFC FFTW Pointer Problems

FFTW Pointer Problems

by
bkelly
from LinuxQuestions.org on (#53MFC)
Centos, C++, FFTW (Fastest Fourier Transform in the West www.fftw.org)
I cannot copy directly from my work computer to my internet computer so please try to forgive typos.
I created a test app and successfully used their code. It used a member array of fixed size, not pointers. When I try to use a pointer the error is puzzling. The declaration causes no error:
Code:fftw_complex * m_fftw_in;
fftw_complex * m_fftw_out;The pointer is initialized to null
Code:m_fftw_in = NULL;And the compiler complains:
Quote:
gl_widget.cpp: In member function void C_GL_Widget::initialize_all_member_variables()':
gl_widget.cpp:2807:14: error: incompatible types in assignment of long int' to double (* [0])[2]'
m_fftw_in = NULL;
^
Trying to assign a value results in the same concept of error.
Code:M_fftw_in[ I ][ REAL ] = 0.0;Where I have constants REAL = 0 and IMAG = 1
There is something obvious I am overlooking. Please point me in the right direction.

EDIT
Well Crum. I changed from the functions that FFTW recommends for replacing the new and delete functions: fftw_malloc and fftw_free. When I tried new and delete, the problem resolved. Now I after reverting the code to the problem condition it will not manifest again. I don't know what I had wrong.latest?d=yIl2AUoC8zA latest?i=xO_0IxcTcX8:AxSbaMup_yM:F7zBnMy latest?i=xO_0IxcTcX8:AxSbaMup_yM:V_sGLiP latest?d=qj6IDK7rITs latest?i=xO_0IxcTcX8:AxSbaMup_yM:gIN9vFwxO_0IxcTcX8
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments