Reserved names in C++? With there usage in both English and CN. List them line by line

In C++, there are several reserved keywords that have special meanings and cannot be used as identifiers (variable names, function names, etc.) in your code. Here's a list of some of these reserved keywords along with their usage in both English and Chinese (CN):

1. `auto` - English: Automatic, CN: 自动
2. `bool` - English: Boolean, CN: 布尔
3. `break` - English: Break, CN: 中断
4. `case` - English: Case, CN: 情况
5. `char` - English: Character, CN: 字符
6. `const` - English: Constant, CN: 常量
7. `continue` - English: Continue, CN: 继续
8. `default` - English: Default, CN: 默认
9. `do` - English: Do, CN: 做
10. `double` - English: Double, CN: 双精度
11. `else` - English: Else, CN: 否则
12. `enum` - English: Enumeration, CN: 枚举
13. `false` - English: False, CN: 假
14. `float` - English: Float, CN: 单精度
15. `for` - English: For, CN: 循环
16. `if` - English: If, CN: 如果
17. `int` - English: Integer, CN: 整数
18. `long` - English: Long, CN: 长整数
19. `namespace` - English: Namespace, CN: 命名空间
20. `nullptr` - English: Null pointer, CN: 空指针
21. `return` - English: Return, CN: 返回
22. `short` - English: Short, CN: 短整数
23. `static` - English: Static, CN: 静态
24. `switch` - English: Switch, CN: 开关
25. `true` - English: True, CN: 真
26. `typedef` - English: Type definition, CN: 类型定义
27. `unsigned` - English: Unsigned, CN: 无符号
28. `void` - English: Void, CN: 空
29. `volatile` - English: Volatile, CN: 易失性
30. `while` - English: While, CN: 当

31. `asm` - English: Assembler, CN: 汇编
32. `class` - English: Class, CN: 类
33. `delete` - English: Delete, CN: 删除
34. `friend` - English: Friend, CN: 友元
35. `goto` - English: Goto, CN: 跳转
36. `new` - English: New, CN: 新建
37. `operator` - English: Operator, CN: 运算符
38. `private` - English: Private, CN: 私有
39. `protected` - English: Protected, CN: 保护
40. `public` - English: Public, CN: 公共
41. `sizeof` - English: Sizeof, CN: 大小
42. `static_assert` - English: Static assert, CN: 静态断言
43. `template` - English: Template, CN: 模板
44. `this` - English: This, CN: 当前对象
45. `try` - English: Try, CN: 尝试
46. `typeid` - English: Type ID, CN: 类型标识符
47. `typename` - English: Type name, CN: 类型名称
48. `virtual` - English: Virtual, CN: 虚拟
49. `wchar_t` - English: Wide character, CN: 宽字符
50. `volatile` - English: Volatile, CN: 易失性 (repeated for emphasis)

51. `alignas` - Specifies alignment requirements, CN: 对齐
52. `alignof` - Retrieves alignment requirements, CN: 对齐
53. `and` - Logical AND operator, CN: 与
54. `and_eq` - Bitwise AND assignment operator, CN: 与且赋值
55. `bitand` - Bitwise AND operator, CN: 按位与
56. `bitor` - Bitwise OR operator, CN: 按位或
57. `compl` - Bitwise NOT operator (complement), CN: 按位取反
58. `not` - Logical NOT operator, CN: 非
59. `not_eq` - Not equal operator, CN: 不等于
60. `or` - Logical OR operator, CN: 或
61. `or_eq` - Bitwise OR assignment operator, CN: 或且赋值
62. `xor` - Logical XOR operator, CN: 异或
63. `xor_eq` - Bitwise XOR assignment operator, CN: 异或且赋值

These keywords are used for various bitwise and logical operations in C++ code. As always, refrain from using them as identifiers to avoid conflicts and compilation errors.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值