如果你使用的是dev-c++这款软件进行编程,下表列出了常见的编译错误提示:
| 语法错误 | 软件提示 |
| 缺少分号“;” | [Error] expected ' ; ' before ' return ' |
| 变量x未声明 | [Error] ' x ' was not declared in this scope |
| 头文件写错 | [Error] bts/stdc++.h: No such file or directory |
| 命名空间写错 | [Error] expected nested-name-specifier before ' nmespace ' |
| 主函数main()写错 | [Error] ld returned 1 exit status |
| cout语句箭头打反 |
[Error] no match for ' operator>> ' (operand types are ' std::ostream {aka std::basic_ostream<char>}' and ' int ') |
| 变量重名 | [Error] redeclaration of ' int s ' |
| {}括号掉了 | [Error] expected ' } ' at end of input |
本文详细列举了在使用dev-c++编程时可能出现的常见编译错误,包括语法错误、变量声明问题、头文件引用错误、命名空间错误、main函数结构和cout操作符使用等,并提供了相应的解决方案。

1万+

被折叠的 条评论
为什么被折叠?



