How do I declare multi dimensional arrays?
Code:
char *ptr;
ptr = new char[size];
Worked... but...
Code:
char **ptr;
ptr = new char[3][2];
Gives an error 'Cannot convert char[2]* to char **'.
Code:
char * ptr[];
ptr = new char [2][3];
Obviuosly gave an error 'The size of ptr[] is unknown or zero.'
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...