Nested container in c++

  c++, nested, stl, vector

I am new to C++ concepts,I am very much confused in inserting a value in a nested container.

#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<vector<vector<vector<vector<int>>>>>s;
    s[0][0][0][0].push_back(5);
    return 0;
}

My program gets terminated abnormally.

Source: Windows Questions C++

LEAVE A COMMENT