Why array of length zero.

Nov 26, 2011 at 2:41pm
Why GCC allow to create an array of length 0 as c++ does not allow to make a an array of length zero.
int ptr[0] ;
Has it any benefit ?
Nov 26, 2011 at 2:45pm
You can read about it here http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

If you pass the -pedantic flag to gcc you will get a warning.

Last edited on Nov 26, 2011 at 2:46pm
Nov 26, 2011 at 3:14pm
bro i m a beginner and dont know ISO C99 and C90 plz tell me in simple c++.
Topic archived. No new replies allowed.