调试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 打赏 收藏 转发到动态 举报
写回复
用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
  • 打赏
  • 举报
回复
在最后一行回车加一空行:)
  • 打赏
  • 举报
回复
括号是否匹配?
笔记本的风扇控制 ---------------------------------------- 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 compiled 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- independent acpica.lib produced by the Microsoft Visual C++ 6.0 32- bit compiler. 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 Compiler/Disassembler and Tools: Fixed a problem where the presence of the _OSI predefined control method within complex expressions could cause an internal compiler error. AcpiExec: Implemented full region support for multiple address spaces. SpaceId is now part of the REGION object. BZ 429 ---------------------------------------- 11 Oc

69,396

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧