1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(43) : error C2143: syntax error : missing '{' before ':'
原因:使用了C的编译方式编译C++代码。
解决方法:右键C/CPP文件Properties->C/C++>Advanced>Compile As and check Compile as C++ Code(/TP)