我有一个c样式的数组,其大小由a定义,#define并且可以根据编译选项进行更改,例如
#define
#if LINUX # define SIZE 4 #else # define SIZE 5 #endif static int myArr[SIZE] = { /* ??? */ };
如何将整个数组初始化为非零值,例如all 42?
42
c++ c++11
c++ ×1
c++11 ×1