To exemplify what I am having trouble with. I made this simple program, I tried to read a bunch of tutorials and search my trouble in google but I just did not understand.
#include<iostream>
using namespace std;
void noobFunction( int col , int table[][col]){ // compile error
table[0][0] = 2;
cout << table[0][0];
}
int main() {
cout << "Enter the number of rows in the 2D array: ";
int row;
cin >> row;
cout << "Enter the number of columns in the 2D array: ";
int col;
cin >> col;
int table[lin][col];
noobFunction(col, table);
return 0;
}