»
(18) C++14 smart pointer and reference counter*
(19) C++14 pthread*
(20) C++14 synchronized locker--mutex*
(24) C++ time and sleep*
(25) C++ High Precision Computation*
(27) C++14 std::string*
(31) Advanced Level C++ Tech*
(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);