this is my code i wanted to return a 2d array from a function and use it in other function inorder to modify it.
#include<bits/stdc++.h>
using namespace std;
int** createMat(int row,int col){
     int arr[row][col];
     for(int i=1;i<=row;i++){
         for(int j=1;j<=col;j++){
             cin>>arr[i][j];
         }
     }
return arr;
     
}
int main(){
    int row,col;
    cin>>row;
    cin>>col;
    createMat(row,col);
   
}
 
     
    