Logo

Programming-Idioms

History of Idiom 26 > diff from v43 to v44

Edit summary for version 44 by programming-idioms.org:
[Cpp] error: ‘>>’ should be ‘> >’ within a nested template argument list

Version 43

2018-06-24, 10:27:14

Version 44

2018-08-05, 12:06:47

Idiom #26 Create a 2-dimensional array

Declare and initialize a matrix x having m rows and n columns, containing real numbers.

Illustration

Idiom #26 Create a 2-dimensional array

Declare and initialize a matrix x having m rows and n columns, containing real numbers.

Illustration
Imports
#include <vector>
Imports
#include <vector>
Code
std::vector<std::vector<double>> x (m, std::vector<double> (n));
Code
std::vector<std::vector<double> > x (m, std::vector<double> (n));