I have just started to code in c++ and usually I used Emacs on a Linux. I then tried to continue work at home on a Windows using visual studio 2017.
This beginning of a code worked on the Linux but continually gives me the Error "
The array type "int [n] [n]" can not be assigned" when used on visual studio and i can not understand why.
I want to write a program which will calculate a determiant of a given matrix
#include<iostream>
using namespace std;
int main(){
int n;
int r,s;
double w;
cout<<"please give the size of the matrix from with the determinant be calculated n=";
cin>> n; //User provides size of array
double m[n][n];
for(int k=0; k<n; k++) {
for(int l=0; l<n; l++)
{
r=k+1;
s=l+1;
cout<<"Value of the " <<r<<"x"<<s<<" elemente =";
cin>>w;
m[k][l]=w;
};
};
}
Thank you for your help.