Matlab2C++

Write your question here.
Hello All
I have a Matlab code and I want to convert it to C++, this code is full of matrices, and to define them in C++, it took more than 20 min to run a matrix 8*8 in C++, I have no idea about C++, and via rewriting this code I want to learn it.
I want to know if my approach is wrong. I mean defining matrices in C++ is not good and I must use another way, or defining matrix was wrong(20' for a 8*8)?
Can anyone guide me?
Thank you
Yeki
Can you paste your code? Even 2 seconds would be too long.
yes
that's my code


#include <iostream>
#include <cmath>

using namespace std;




int main()
{

float mu = 0.004;
float rho = 1;
float N=32; float h = 1/N;
int max[3];
max[0]=2;max[1]=0;max[2]=4;
cout<<max;
int i, j;
int arr1[8][8];

for (i = 0; i <= 7; i++)
for (j = 0; j < = 7; j++)
cin >> arr1[i][j];
for (i = 0; i <= 7; i++)
{
for (j = 0; j < = 7; j++)
cout << arr1[i][j];
cout << endl;
}
return 0;
}


Thanks if you guide me.
Topic archived. No new replies allowed.