below is my code:
//variables
double sSideA,sSideB;
double incrementA,incrementB;
double eSideA,eSideB;
//obtain user input
cout << "Please enter the starting value of side A: ";
cin >> sSideA;
cout << "Please enter the end value of side A: ";
cin >> eSideA;
cout << "Please enter the increment value of side A: ";
cin >> incrementA;
cout << "Please enter the starting value of side B: ";
cin >> sSideB;
cout << "Please enter the end value of side B: ";
cin >> eSideB;
double hypo[eSideA][eSideB]; //initialize multidimensional array
I'm trying to create a multidimensional array with a size determined by the user input. I'm getting an error from Microsoft Visual Studio that says hypo
must only contain constant values.
Is it possible to generate an array determined by the user's eSideA
and eSideB
?
Thank you.