cpp特殊知识点

线程安全map,unordered_map

#include <thread>  
#include <concurrent_unordered_map>  
#include <concurrent_map>  

宏定义的替换与连接

1.# 字符串化
# p(A) printf("A / 2 = %d", (A / 2))
// p(4) 
// A / 2 = 2

# p2(A) printf("#A / 2 = %d, (A / 2))
// p2(4)
// 4 / 2 = 2 

2.## 组成
# p3(n) x ## n
// int p3(1) = 0;
// 等价与 int x1 = 0;

posted @ 2023-11-21 17:11  InsiApple  阅读(8)  评论(0编辑  收藏  举报