Error: 'complex' is not a member of 'std' compiling simple c++ program on linux with gcc -


here beginner's question. have following simple code trying compile on linux using gcc (v 4.8.5)

#include <complex> int main(){     std::complex<double> hello;     return 0; } 

the code above in file test.cpp. entering

gcc test.cpp 

in terminal results in following output

test.cpp: in function int main(): test.cpp:3:2: error: complex not member of std std::complex<double> hello; ^ test.cpp:3:15: error: expected primary-expression before double std::complex<double> hello;              ^ test.cpp:3:15: error: expected ; before double 

any ideas?


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -