+ 1
c++ arrays
Hi everyone! I want to create a function to set a two dimensional array but I do not want to specify how many rows and columns the array will have. But I can't do it. Take a look: ----------------------------------- void setARR(int arr[][], int size1, int size2) { for (int i = 0; i < size1; i++) { for (int j = 0; j < size2; j++) { int x; cin >> x; arr[i][j] = x; } } } ----------------------------------- What should I do?
2 Respostas
+ 2
it's not possible... only last dimensions of multidimensional array can be left blank...
+ 2
Check out this code!
https://code.sololearn.com/cEyEfqU8ERHM/?ref=app