I am reading a book saying that in C++ you can't do this:
int array_size = 3;
int array[array_size];
Then I tried it with gcc,but it didn't complain at all(exception warned about unused array
).
Also I read about this question.The 4th answer says that you can use something like this:char someCondition[ condition ];
To me the condition
would only be known until runtime,so the whole thing seems really confounding to me.Can anyone help explain this?
Thanks,G