error in c, but not in c++
- by eswar
const int t=5;
char buf[t+5];
When I compile this gives error in C but not in C++!!
Can anybody please explain me the reason?
Note: I know the const defaults to internal linkage in 'C++', where as in 'C' it defaults to external linkage. Does it has any relation to the above case??