Your getData( ) function is being passed the int ** BY VALUE. It can allocate memory to that pointer variable, but that allocation only exists within the scope of the function. The int ** in main( ) is still not allocated any memory.
So, to make life interesting, you must pass the int** by reference, like:
void getData( int** & ,int&,int&);
Also, in getData( ), you are using the row and column variables backwards. Do the allocations and reading loops with row as the outer loop, column as the inner loop, as you do in your display function.
Reputation Points: 1268
Solved Threads: 228
Posting Virtuoso
Offline 1,895 posts
since Aug 2007