fstream stopping math.h from working

Posted by CaptainProg on Stack Overflow See other posts from Stack Overflow or by CaptainProg
Published on 2011-11-22T17:17:33Z Indexed on 2011/11/22 17:51 UTC
Read the original article Hit count: 220

Filed under:
|
|

I am creating a program in C++ in which I need to read a text file in. I have included the fstream header file, which allows me to open the file, but having added the include, I now receive countless errors relating to math.h functions. Examples:

1>c:\program files\microsoft visual studio 10.0\vc\include\cmath(19): error C2061: syntax error : identifier 'acosf'
1>c:\program files\microsoft visual studio 10.0\vc\include\cmath(19): error C2059: syntax error : ';'

Is there any way I can include the text file reading functions of fstream without compromising the math.h functions? And why does this conflict occur anyway?

/Edit/

It seems the errors are in the cmath standard header file. It is nothing I have access to, but for the sake of completion, here is the code that is causing the errors:

using _CSTD acosf; using _CSTD asinf;
using _CSTD atanf; using _CSTD atan2f; using _CSTD ceilf;

(etcetera)

© Stack Overflow or respective owner

Related posts about c++

Related posts about fstream