提示コードですが以下の構造体です//
アイテムリストのベクター変数部ですが構造体の中のitemList
変数の中のitemList
変数の中...というように再帰的にtitle
変数を表示する方法が知りたいです。
構造体
cpp
1std::vector<PullDown_Item> itemList; //アイテムリスト 2/*##################################################### 3 # プルダウン アイテム 4 #######################################################*/ 5 struct PullDown_Item 6 { 7 std::string title; //タイトル 8 Console::ColorPair dispColor; //表示色 9 Console::ColorPair selectColor; //選択色 10 RenderType renderType; //レンダータイプ 11 std::vector<PullDown_Item> itemList; //アイテムリスト 12 }; 13
ループ
cpp
1for(std::vector<PullDown_Item>::iterator itr = itemList.begin(); itr != itemList.end(); itr++) 2{ 3 for() 4 { 5 for() 6 { 7 for() 8 { 9 if(){ /* */ } 10 } 11 12 } 13 14 } 15 16} 17

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。