c++ error: array bound is not an integer constant before ']' token
int h = 0;
cout << "input an interge:";
cin >> h;
cout << h << endl;
const int kl = h;
char buf[kl];
typedef struct tmpStru{
char field[kl]; // 即使在上面声明了 kl 为 const int,这边也是无法编译过去的
}tmpStru;
浙公网安备 33010602011771号