PDA

View Full Version : [ubuntu] Deprecated header



newport_j
November 29th, 2010, 08:54 PM
#warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.

I get this above error when I use a c++ compiler on some c code; the c code compiles perfectly with gcc. I am aware that it is telling me that I am using a deprecated header.

According to the line number it is the header

<complex.h>

in the c code. What is the new header to replace complex.h?

Newport_j

talonmies
November 29th, 2010, 09:04 PM
<complex>

muteXe
November 29th, 2010, 10:37 PM
and you might have to add:


using namespace std;


at the top (if you havent already).