1

I found a difficulty on creating an array with user defined size. It shows error, can anybody teach me how to do this?

int main()
{
    int row, column;
    cout << "Enter the amount of row" << endl;
    cin >> row;
    cout << "Enter the amount of column" << endl;
    cin >> column;
    int array[row][column]; //the value of variable cannot be used as a constant
    system("pause");
}
Paul R
  • 208,748
  • 37
  • 389
  • 560
JC YOUNG
  • 51
  • 1
  • 9

0 Answers0