c++中結構體中存儲結構體數組

c++中結構體中存儲結構體數組 首先定義存結構體數組的結構體和子結構體 #ifndef ZYXX_H #define ZYXX_H struct child { char a1[10]; int a2; }; struct Parent{ child *c1; }; #endif // ZYXX_H 而後首先建立子結構體數組,分別賦值,最後把子結構體數組存到父結構體中;
相關文章
相關標籤/搜索