小代码积累 mxdbhs 2020-05-17 101 阅读1分钟 #大小写转换 #define tolower(c) ((c >= 'A' && c <= 'Z') ? (c | 0x20) : c) #define toupper(c) ((c >= 'a' && c <= 'z') ? (c & ~0x20) : c) #宏代替名字空间 #define BEGIN_NAMESPACE(X) namespace x { #define END_NAMESPACE(X) }