in C/C++ is it legal to define and initialize several id in one row?
case 1: int x, y = 0;// what is in x and y? case 2: int x = 0, y = 1, z =
2; //syntax error before ',' taken
for case 2, I am not willing to code as follow:
int x = 0;
int y = 1;
int z = 2;
Is there a simple statement to do the same job? thanks a lot 1
No comments:
Post a Comment