2011-04-13 85 views

回答

2

std::vector<std::map<a,b> >

,或者如果你要處理的建築/銷燬自己

std::vector<std::map<a,b>* >

其中A和B都在地圖

例如鍵/值:

#include <vector> 
#include <map> 

int main(int argc, char* argv[]) 
{ 
    std::vector<std::map<int,int>> vecOfMaps; 
    std::vector<std::map<int,int>*> vecOfMaps2; 
    return 0; 
} 
+1

尖括號/括號不匹配是什麼? – 2011-04-13 23:59:20

+0

和'「stdafx.h」'o_O。和非標準的'主要'定義。 – 2011-04-14 00:06:49

+0

確實,給定的代碼有很多問題。不過,這種方法是有效的。不過這不是一個數組。 – 2011-04-14 00:08:20

相關問題