私はこのmap<string, vector <pair<int, int> > >
変数を持っていて、値をプッシュ バックしていますが、code::blocks はペアに push_back というメンバー関数がないことを示しています。ではなくペアを押し戻すにはどうすればよいpair<>.push_back()
ですか?
これは基本的に私がしていることです:
map<string, vector <pair<int, int> > > T;
for(int x = 0; x < data.size(); x++)
T[data[x].str].push_back(data[x].PAIR)
エラーは次のとおりです。
error: no matching function for call to 'std::vector<std::pair<int, int>,
std::allocator<std::pair<int, int> > >::push_back(std::map<int, int,
std::less<int>, std::allocator<std::pair<const int, int> > >&)'