satellite03
IS-IT--Management
hi i am trying to learn using vector of a vector
thats why i wrote the code below but unfortunately its not compiling( and also have doubt whether it will run )
thats why i wrote the code below but unfortunately its not compiling( and also have doubt whether it will run )
Code:
#include<vector>
#include<stdio.h>
{
typedef vector<int> row;
typedef vector<row> temp;
row R1;
temp T1;
for (int x = 0; x <3; ++ x)
R1.push_back(x);
T1.push_back(R1);
T1.push_back(R1);
matrix.push_back(T1);
for(int i = 0; i < matrix.size(); i++)
for(int j = 0; j < matrix[i].size(); j++)
printf("%d ", matrix[i][j]);
}
i have also doubt that whether my matrix[i][j] will be printed in this way.....anyway let me first remove compilation error...