Friday, October 30, 2009

Published 10/30/2009 by with 0 comment

array dimension missing

'array dimension missing' is shown when the array size is not specified while allocating memory for the array or creating an array.

See below:

int data[ ]=new int[ ];

See that, blank [ ] is given in new int[ ]. We must give an int as the size of the array. Memory will be allocated for the array according to the given int within the [ ] as below:

int data[]=new int[5];
    email this       edit

0 comments:

Post a Comment