The following code in microsoft visual C++ 2010 express:
#include <iostream>
//using namespace std;
int main(int argc, char **argv)
{
return(0);
}
gives me the errors:
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(41): fatal error C1003: error count exceeds 100; stopping compilation ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
If comment out “#include ” then it compiles. I created an project from existing code and edited to the above.
Change extension from .c
to .cpp
Sorry for my bad English.
I'd the same problem an was resolved with this configuration parameter:
If you have in "Compile As" field the value "Compile as C Code" then you must change it to Default or "Compile as C++ Code".
I hope I have been helpful
Best regards
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With