社区
C语言
帖子详情
调试C程序时出现“fatal error C1071:unexpected end of file found in comment”
eagleshao
2007-05-12 05:04:16
调试C程序时出现“fatal error C1071:unexpected end of file found in comment”不知这是否是语法错误?出现这种错误有哪些原因呢?
...全文
2232
13
打赏
收藏
调试C程序时出现“fatal error C1071:unexpected end of file found in comment”
调试C程序时出现“fatal error C1071:unexpected end of file found in comment”不知这是否是语法错误?出现这种错误有哪些原因呢?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
13 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Char
2012-01-15
打赏
举报
回复
[Quote=引用 6 楼 afairycell 的回复:]
注释里有中文等字符的时候, 在单行注释最后加个空格, 多行注释 */ 前加一个空格 ...
[/Quote]
正解
Nicholas_Rush
2011-08-03
打赏
举报
回复
检查多行注释 /*与*/是否匹配
HeartWasNot
2011-05-12
打赏
举报
回复
[Quote=引用 2 楼 lightnut 的回复:]
在最后一行回车加一空行:)
[/Quote]++
遇到过这种情况
leang521
2011-05-12
打赏
举报
回复
[Quote=引用 6 楼 afairycell 的回复:]
注释里有中文等字符的时候, 在单行注释最后加个空格, 多行注释 */ 前加一个空格 ...
[/Quote]
正解,VC6就有这个问题
AnYidan
2011-05-03
打赏
举报
回复
[Quote=引用 8 楼 luciferisnotsatan 的回复:]
看看{}大括号是否匹配,这个错误多数是有这引起的
[/Quote]
++
写 { 时住一格式的缩进是个好习惯
luciferisnotsatan
2011-05-03
打赏
举报
回复
看看{}大括号是否匹配,这个错误多数是有这引起的
afairycell
2011-05-03
打赏
举报
回复
当然最好的是注释都用英文。
因为某些特殊中文字符在某些字符集下会被处理成特殊的转义序列, 并且GBK字符集中尾字符还包含了C标准的转义字符 0x5C '\\ ' , 在这些情况下, 转义字符后跟 */ 或者是单行注释的换行都会出错, 特别是在非中文的系统下编译的时候这种情况特别严重。
afairycell
2011-05-03
打赏
举报
回复
注释里有中文等字符的时候, 在单行注释最后加个空格, 多行注释 */ 前加一个空格 ...
Cnwanglin
2007-05-12
打赏
举报
回复
;不会是这个错误吧?
Cnwanglin
2007-05-12
打赏
举报
回复
少}
ayw215
2007-05-12
打赏
举报
回复
少}或者;
lightnut
2007-05-12
打赏
举报
回复
在最后一行回车加一空行:)
珍惜生命远离CPP
2007-05-12
打赏
举报
回复
括号是否匹配?
acpi控制笔记本风扇转速
笔记本的风扇控制 ---------------------------------------- 09 November 2006. Summary of changes for version 20061109: 1) ACPI CA Core Subsystem: Optimized the Load ASL operator in the case where the source operand is an operation region. Simply map the operation region memory, instead of performing a bytewise read. (Region must be of type SystemMemory, see below.) Fixed the Load ASL operator for the case where the source operand is a region field. A buffer object is also allowed as the source operand. BZ 480 Fixed a problem where the Load ASL operator allowed the source operand to be an operation region of any type. It is now restricted to regions of type SystemMemory, as per the ACPI specification. BZ 481 Additional cleanup and optimizations for the new Table Manager code. AcpiEnable will now fail if all of the required ACPI tables are not loaded (FADT, FACS, DSDT). BZ 477 Added #pragma pack(8/4) to acobject.h to ensure that the structures in this header are always
com
piled as aligned. The ACPI_OPERAND_OBJECT has been manually optimized to be aligned and will not work if it is byte-packed. Example Code and Data Size: These are the sizes for the OS- indep
end
ent acpica.lib produced by the Microsoft Visual C++ 6.0 32- bit
com
piler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Previous Release: Non-Debug Version: 78.1K Code, 17.1K Data, 95.2K Total Debug Version: 155.4K Code, 63.1K Data, 218.5K Total Current Release: Non-Debug Version: 77.9K Code, 17.0K Data, 94.9K Total Debug Version: 155.2K Code, 63.1K Data, 218.3K Total 2) iASL
Com
piler/Disassembler and Tools: Fixed a problem where the presence of the _OSI predefined control method within
com
plex expressions could cause an internal
com
piler
error
. AcpiExec: Imple
ment
ed full region support for multiple address spaces. SpaceId is now part of the REGION object. BZ 429 ---------------------------------------- 11 Oc
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
意思是: 致命错误,(错误代码)
C1071
:在注释前后
出现
程序
(代码)异常终止。
调试
了一下,问题出在同一行内成对的“/”"/"上边。 把同一行内的注释由成对的“/”"/"改成“//”注释可解决这一问题。 原因是注释使用中文,配合其前边的“”,诱发编译器误判为“/",导致其后的注释...
VS2013,
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
又是文件编码的问题, 我在编译
程序
时
,
出现
了“
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
”错误,最后发现,是VS2013识别文件编码的问题,现在将其抽象出来。 我的代码如下: 编译后,有如下警告和错误: 1>------ Rebuild All started: Project: vc_test_code,
使用VC6.0编译C++代码的
时
候报错:
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
(Mark ZZ)...
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
(Mark ZZ) 今天在一论坛上看到一人发帖: 『最近遇到一个奇怪的问题,代码中的中文注释能使
程序
出错!!! 试看如下的代码: int main()...
使用VC6.0编译C++代码的
时
候报错:
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
(Mark ZZ) ...
fatal
error
C1071
:
unexpected
end
of
file
found in
com
ment
(Mark ZZ) 今天在一论坛上看到一人发帖: 『最近遇到一个奇怪的问题,代码中的中文注释能使
程序
出错!!! 试看如下的代码: int main() { int a = 0; int b = 0; /**停车来源字*/——————应改...
C语言
69,396
社区成员
243,080
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章