Q:

std::get returns error while working with vector of tuples

I'm trying to create a vector that holds tuples
this is my code:
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;
    }

Error:
no matching function for call to 'get(std::vector<std::tuple<std::basic_string<char,
std::char_traits<char>, std::allocator<char> >, int, int> >&)'*

What is wrong with it?
Thanks.

A:

This is the working version of your code
std::vector<std::tuple<std::vector<std::tuple<std::string,int,int>>>> vec;
for (int 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]) = "str";
        std::get<1>(std::get<0>(vec[i])[j]) = 1;
    }
}

http://coliru.stacked-crooked.com/a/0cdc4531904a56b3
You have a few missing > and the you completely messed up the assignment statement.
My suggestion: DO NOT ever create data structure like this. If you need complex data structure, make real structs/classes. Give them meaningful name. This will make the code much more readable and maintainable. 
e.g.
struct Record {
    std::string name;
    int value;
    int otherValue;
};

instead of
std::tuple<std::string,int,int>

Also you have a tuple contains only single element, which doesn't make much sense here.

