摘要:
英文标题(Prefer consts, enums, and inlines to #defines)理由:①使用宏定义常量的过程中,出错的时候难以调试,宏的常量在编译时不进入符号表。②使用宏定义的函数功能,极容易出现错误的期待结果。Things to remember:1.for simple constants, prefer const objects or enums to #define.对于一般的常量,尽量使用const对象或者枚举,而不用宏。2.For function-like macros, prefer inline functions to #define.对于类似函数的 阅读全文