COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/Map_simple.cpp

4 lines
93 B
C++

int array[9];
for(int i = 0; i < 9; ++i) array[i] = i;
cout << Map<Matrix3i>(array) << endl;