读书人

C++ 自己写了个程序 当不include关于t

发布时间: 2012-05-10 16:02:39 作者: rapoo

C++ 自己写了个程序 当不include关于time的头文件都能运行,但是当include了time.h或ctime 程序就报错:
自己写了个程序 当不include关于time的头文件都能运行,但是当include了time.h或ctime 程序就报错:
1> Energy.cpp
1>d:\vs 2010\vc\include\time.h(279): error C2059: 语法错误:“}”
1>d:\vs 2010\vc\include\time.h(279): error C2143: 语法错误 : 缺少“;”(在“}”的前面)
1>d:\vs 2010\vc\include\time.h(279): error C2059: 语法错误:“}”
1>d:\vs 2010\vc\include\ctime(17): error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>d:\vs 2010\vc\include\ctime(17): error C2447: “{”: 缺少函数标题(是否是老式的形式表?)


求大神帮忙解答啊!!
在线等


[解决办法]
你的代码我这里编译没问题,环境vs2010
[解决办法]
偶遇到类似问题都是用
“每次用/*...*/注释掉不同部分再重新编译,直到定位到具体语法出错的位置。”
的方法解决的。

读书人网 >C++

热点推荐