This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 3.4.4 vs 3.2.5 ; fabs: cant use as a function..


Hi Ming-Xiang,

Are you using C (gcc) or C++ (g++)?

If you are using C, you are using #include <math.h>.

If you are using C++, you should be using #include <cmath>.

My advice is:  don't use C header files in a C++ program.  The C header file
may define a macro, when what you really want is a C++ function.

HTH,
--Eljay



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]