1
0
Fork 0

Ex2.5 feedback: Show how a multidimensional array is stored in-memory

This commit is contained in:
Eric Teunis de Boone 2020-06-30 11:29:50 +02:00
parent 415032e0ef
commit 95ddbf5bde
1 changed files with 11 additions and 1 deletions

View File

@ -37,7 +37,6 @@ int main() {
double * nvec = multiply( ivec, Nx, mtx );
@ -49,6 +48,17 @@ int main() {
}
std::cout << "]" << std::endl;
delete nvec;
// print the matrix as it is stored in memory
std::cout << "In-Memory Matrix = ";
std::cout << "[" << std::endl;
for ( int i = 0; i < Nx*Y_SIZE; i++ ){
std::cout << mtx[0][i] << ", ";
}
std::cout << std::endl;
std::cout << "]" << std::endl;
}