Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

create vectors of vectors c++

typedef std::vector<std::vector<double> > Matrix;

Matrix matrix = { {0.1,1.1,.2},
                 {.4,.5,.6}, 
                 {.8,.9,.10}
                };
// Just initilization:
int rows = 3;
int cols = 3;
Matrix m3(rows, std::vector<double>(cols) );
 
PREVIOUS NEXT
Tagged: #create #vectors #vectors
ADD COMMENT
Topic
Name
7+9 =