How do I declare multi dimensional arrays?
Worked... but...Code:char *ptr; ptr = new char[size];
Gives an error 'Cannot convert char[2]* to char **'.Code:char **ptr; ptr = new char[3][2];
Obviuosly gave an error 'The size of ptr[] is unknown or zero.'Code:char * ptr[]; ptr = new char [2][3];
I tried some other combinations in vain; but they gave errors like 'Lvalue required'.
I checked many books, but they only give the syntax for single dimensional arrays...
Please Excuse if this question looks really stupid or if the answer is obvious...



LinkBack URL
About LinkBacks


