»
(18)C++14 智能指针及引用计数*
(19)C++14 多线程pthread*
(20)C++14 同步锁mutex*
(24)C++中的计时与等待*
(25)C++中的高精度计算*
(27)C++14 std::string*
(31)C++高级技能*
(33)C++的变长参数宏
宏定义实现是否输出日志:
man 3 printf 查看printf库函数用法
log.h声明:
void printf_nothing(const char *format, ...);
//#define LOG(...) printf(__VA_ARGS__)
#define LOG(...) printf_nothing(__VA_ARGS__)
log.c定义:
#include "log.h"
void printf_nothing(const char *format, ...){
}
日志打印使用:LOG("Loging:::a:%d\n", a);