string
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
Hello, I want to ask how to store a String in 2-D array foramt? e.g. abc[0][0]="A"; abc[0][1]="AA"; abc[0][2]="AAA"; ...... .... .. abc[n][n]="AAAAAAAAAAAAAAA"; THX!!! I am not using MFC, just the console mode!!! I think it for a long time!!!
If your 2-D array will simply hold literal strings, like in your example, declare it as a 2-D array of pointers to characters, like this:
char* abc[N][N];
This assumes N is a predefined constant value. Regards, Alvaro Insanity: doing the same thing over and over again and expecting different results. - Albert Einstein