C++常见错误(汇总版1)

常见的错误有 
1. 语义错误(Ambiguous operand):模棱两可的操作数。
2. 语义错误(Ambiguous operator):模棱两可的运算符。
3. 语义错误(Type mismatch):类型不匹配。
4. 语义错误(Type mismatch in parameter):参数类型不匹配。
5. 语义错误(Type mismatch in function return):函数返回值类型不匹配。
6. 语义错误(Use of undefined variable):使用未定义的变量。
7. 语义错误(Use of undeclared function):使用未声明的函数。
8. 语义错误(Use of undeclared label):使用未声明的标签。
9. 语义错误(Undefined label):未定义的标签。
10. 语义错误(Jump to undefined label):跳到未定义的标签。
11. 语义错误(Jump to undefined instruction):跳到未定义的指令。
12. 语义错误(Invalid use of undefined type):错误地使用了未定义的类型。
13. 语义错误(Invalid use of undefined variable):错误地使用了未定义的变量。
14. 语义错误(Invalid use of undefined function):错误地使用了未定义的函数。
15. 语义错误(Invalid use of undefined field):错误地使用了未定义的字段。
16. 语义错误(Invalid use of undefined structure tag):错误地使用了未定义的结构体标签。
17. 语义错误(Invalid use of undefined enumeration constant):错误地使用了未定义的枚举常量。
18. 语义错误(Case outside of switch statement):Switch语句之外的Case标签。
19. 语义错误(Default outside of switch statement):Switch语句之外的Default标签。
20. 语义错误(Goto outside of loop/switch):在循环或Switch语句之外使用Goto语句。
21. 语义错误(Value cannot be negative):值不能为负数。
22. 语义错误(Division by zero):除以零。
23. 语义错误(Modulo by zero):求模0。
24. 语义错误(Impossible bit pattern):不可能的二进制位模式。
25. 语义错误(Impossible enumeration value):不可能的枚举值。
26. 语义错误(Bit field too large):位字段过大。
27. 语义错误(Bit field not an integer type):位字段不是整数类型。
28. 语义错误(Initializer element is not constant):初始化元素不是常量。
29. 语义错误(Initializer element is out of range):初始化元素超出范围。
30. 语义错误(Initializer list too long):初始化列表过长。
31. 语义错误(Initializer must be constant):初始化必须是常量。
32. 语义错误(Initialization of non-local variable):初始化非局部变量。
33. 语义错误(Initialization of static variable):初始化静态变量。
34. 语义错误(Redefinition of 'xxx' as different kind of symbol):将"xxx"重新定义为不同类型的符号。
35. 语义错误(Too many initializers for 'xxx'):"xxx"的初始化器太多。
36. 语义错误(Initialization makes pointer from integer without a cast):从整数初始化指针,而无需强制转换。
37. 语义错误(Type mismatch in conditional expression):条件表达式类型不匹配。
38. 语义错误(Mismatch in argument count):参数个数不匹配。
39. 语义错误(Mismatch in argument type):参数类型不匹配。
40. 语义错误(Argument type mismatch with prototype):参数类型与原型不匹配。
41. 语义错误(Too few arguments for function 'xxx'):函数"xxx"的参数太少。
42. 语义错误(Too many arguments for function 'xxx'):函数"xxx"的参数太多。
43. 语义错误(Incompatible pointer type):不兼容的指针类型。
44. 语义错误(Incompatible function pointer type):不兼容的函数指针类型。
45. 语义错误(Incompatible array subscript):不兼容的数组下标。
46. 语义错误(Incompatible structure/union member):不兼容的结构体/联合体成员。47. 语义错误(Incompatible tag in structure/union):不兼容的结构体/联合体标签。
48. 语义错误(Incompatible enumeration constant):不兼容的枚举常量。
49. 语义错误(Incompatible types in assignment):赋值时类型不兼容。
50. 语义错误(Incompatible types in comparison):比较时类型不兼容。

  • 9
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Charles Coding

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值