그렇다면 어떻게? 현재 액션 맵을 사용하여 여러 플레이어에 대한 입력을 처리하려고하기 때문입니다.C++로지도 배열을 사용할 수 있습니까?
3
A
답변
2
std::vector<std::map<a,b> >
하거나 건설/파괴를 처리하려면 자신을 A와 B는지도 예를 들어
의 키/값입니다
std::vector<std::map<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
일치하지 않는 꺾쇠 괄호/괄호는 무엇입니까? –
+0
그리고''stdafx.h ''o_O. 그리고 비표준'main' 정의. –
+0
실제로 주어진 코드에는 몇 가지 문제가 있습니다. 그래도 접근법은 유효합니다. 그래도 배열은 아닙니다. –
'std :: map m [SIZE]'또는'std :: vector >'? –
birryree