2011-04-13 31 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

相关问题