Pointers and two dimentional arrays
Nov 7, 2010 at 8:01am Nov 7, 2010 at 8:01am UTC
I am having difficulty with using pointers with two-dimensional arrays. Below is the beginnings of a wild guess. What am I missing? Any help would be appreciated.
1 2 3 4 5 6
...
const int NUM = 12, LET = 10;
char monthName[NUM][LET]= {"January" , "February" , "March" , "April" , "May" , "June" , "July" , "August" , "September" , "October" , "November" , "December" };
char ** ptr = monthName[][];
...
Nov 7, 2010 at 9:16am Nov 7, 2010 at 9:16am UTC
choose one:
1 2 3
char ** ptr = monthName;
char * ptr = monthName[0];
char * ptr = &monthName[0][0];
Topic archived. No new replies allowed.