what is wrong with this code?
Code:
/* program: multi dimensional array
* description: creates a multi dimensional array, whose size the user inputs
*/
#include <iostream>
#include <string>
using namespace std;
int main(){
int first_dimension; //legnth of first dimension
int second_dimension; //length of second dimension
//iterating variables
int i;
int j;
//decimal point
string point = ".";
cout <<"What size do you want the first dimension to be." <<endl;
cin >>first_dimension; //input length of first dimension
cout <<"What size do you want the second dimension to be." <<endl;
cin >>second_dimension; //inputs length of second dimension
cout <<"---------------------------------------" <<endl;
string multi_array[first_dimension][second_dimension]; //declares multi dimensional array
//nested for loops to iterate through the array
for(i = 0; i < first_dimension; i++){
for(j = 0; j < second_dimension; j++){
multi_array[i][j] = i + point + j ; // assigns value to the array
cout <<multi_array[i][j] <<endl; //displays array
}
}
return 0;
}