c99 things

1、可变参数宏

#define ASSIMP_LOG_WARN_F(string,...)\
        DefaultLogger::get()->warn((Formatter::format(string),__VA_ARGS__))

2、结构体初始化

int a[6] = { [4] = 29, [2] = 15 };
==
int a[6] = { 0, 0, 15, 0, 29, 0 };
声明:
struct point { int x, y; };

初始化,
struct point p = { .y = yvalue, .x = xvalue };

等价于:
struct point p = { xvalue, yvalue };
int whitespace[256]
  = { [' '] = 1, ['/t'] = 1, ['/h'] = 1,
      ['/f'] = 1, ['/n'] = 1, ['/r'] = 1 };

你可能感兴趣的:(c99 things)