首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

C++ 自己写了个程序 当不include关于time的头文件都能运行,但是当include了time.h或ctime 程序就报错:解决办法

2012-05-10 
C++ 自己写了个程序 当不include关于time的头文件都能运行,但是当include了time.h或ctime 程序就报错:自己

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
[解决办法]
偶遇到类似问题都是用
“每次用/*...*/注释掉不同部分再重新编译,直到定位到具体语法出错的位置。”
的方法解决的。

热点排行