typedef struct fenlei5 {
Cstrings name;
CStringArray * pinpai;
} fl5;
Typedef struct fenlei {
Cstrings name;
int num;
Fenlei5 * fenlei5 [100];
} fl0;
Fl0 fl.
Then in the CPP file oninit initialization function defined in the
Fl. Num=0;
CStringArray a1.
A1. The Add (_T (" ma3 jia3 1 "));
Fl5 fl5a1;
Fl5a1. Name=_T (" ma3 jia3 ");
Fl5a1. Pinpai=& amp; a1;
Fl. Fenlei5 [fl. Num]=& amp; Fl1a1;
Fl. Num++;
//////////////////////////////////////////////////////////when the fl. Fenlei5 [0] - & gt; The name can output is ma3 jia3
But the oninit initialization list in the list after reading this fl. Fenlei5 [0] - & gt; The name will display pointer errors?
How can I solve
Ps: actually I program is fl, fl1, fl2, fl3, fl4 fl5, each is a struct body of fl fenlei1 [100] of fl2 fenlei3 [100] and so on
CodePudding user response:
With CStringArray don't directly using a pointer, if you need 2 d, CStringArrayCodePudding user response: