Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to create a two-dimensional array of list type in C++
How to create a two-dimensional array of list type in C++
The list of the implementation list is very simple, similar to the two-dimensional vector < vector & ltint & gt& gt five;

For example, a dynamic two-dimensional array of type int: list.

Small example: for example, realize a dynamic two-dimensional array of type int.

To add rows, add a matrix. Add (new list

Matrix [n]. Add(i) is used to add data to the row; But this operation is not recommended.

List & lt list & ltint & gt& gtmatrix = new list & lt list & lt>> ();

Matrix. Add (new list & ltint & gt ());

Matrix [0]. Add (1);

Console. WriteLine(matrix[0][0]);

Console. read key();