I have the following map in C++:
typedef std::pair<int, int> iPair;
std::map< iPair, std::list< iPair > > world;
I want to make insert and update of the map for a pair(u,v) -> push back in list:
iPair src = make_pair(p1, u1);
iPair dst = make_pair(p2, u2);
map[src].push_back(dst);
I get a compiling error when trying to access map[src]
:
error: missing template arguments before ‘[’ token