Hello everyone, I am having a bit of a problem with this program. I want it to ask the user for a number of rows and number of columns. I then want the program to create a multidimensional array using these dimensions. Next, I want it to populate the array with random numbers from 1 to 1000...Here is what I have so far:
1. You can't make dynamic-size arrays like that in C++. You need to look up how to use new and delete, under dynamic memory in the tutorial.
2. On line 27, what are you doing? It seems like you are just populating the array with some values that are later erased by the assignment on line 33.
3. Speaking of line 33, the d variable is a single random number. That means all the elements in your array will have the same random number. Try assigning A[i][j] to rand()%1000 directly instead.