Logo

Programming-Idioms

History of Idiom 26 > diff from v74 to v75

Edit summary for version 75 by Narc:
[C++] Formatting

Version 74

2020-07-05, 20:30:05

Version 75

2020-09-07, 14:29:02

Idiom #26 Create a 2-dimensional array

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

Idiom #26 Create a 2-dimensional array

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

Variables
x,m,n
Variables
x,m,n
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));
Comments bubble
Formatting.