我正在尝试创建一个包含元组的向量
这是我的代码:
std::vector<std::tuple<std::vector<std::tuple<std::string,int,int>>> vec;
...
...
for (i = 0; i < 5; i++) {
vec.push_back(std::tuple<std::vector<std::tuple<std::string,int,int>>());
for(int j=0;j<5;j++) {
std::get<0>(vec[i]).push_back(std::tuple<std::string,int,int>());
std::get<0>(std::get<0>(vec[i]))[j] = value; //error
std::get<1>(std::get<0>(vec[i]))[j] = value1;
}
错误:
no matching function for call to 'get(std::vector<std::tuple<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int, int> >&)'*
它有什么问题?谢谢。