Hello,
i've a question: how can I get the access to all the elements of a dynamic matrix?
I create a dynamic matrix in this way:
Cout<<"insert matrix dimensions";
cin>>n;
int ** matrix= new int * [n];
for (int i=0;i<n;i++)
matrix [n]= new int [n];

//but when I try to initialize the element in this way:
for (int i=0;i<n;i++)
for (int J=0;j<n;j++)
matrix [i]*[j]=0;

the program gives me an error, how could I insert and modify all the location of the dynamic matrix?

Thanks a lot for attention