#include<bits/stdc++.h>
#include<vector>
using namespace std;
int main(){
int n=5;
vector<vector<int>> v;
v[0][0]=1;
v[1][0]=1;
v[1][1]=1;
cout<<2; //not getting output 2
}
In the above code I am trying to make a dynamic 2D array but the thing is that I am not getting any error but the number 2 is also not getting printed. What may be the reason?