I have a problem declareing dynamic two dimensional arrays. In addition, I want to initialize all of the array's elements to 0, but I can't seem to do so.
This is basically my code:
Yet, the compiler generates an error. Whats wrong with the code?Code:cout << "Enter a number\n"; cin >> n; int *arr = new int [n][n] = {{0},{0}};
Thank you



LinkBack URL
About LinkBacks



CornedBee