My code:
FILE * file;
file = fopen("c://catalog//file.txt", "r");
int m,n; //size of 2d array (m x n)
fscanf(file, "%d", &m);
fscanf(file, "%d", &n);
fclose(file);
printf("Size: %d x %d\n", m, n);
// create 2d array 
char **TAB2 = new char*[m];
for (int i = 0; i < m; i++)
    char *TAB2 = new char[n];
// display 2d array 
for (int i = 0; i < m; i++){
    for (int j = 0; j < n; j++)
    {
        printf("%c ", &TAB2[i][j]);
    }
    printf("\n");
}
How fill this array with chars or string? for example text = "someting", and for array 3x5 will be:
S o m e t
h i n g ?
? ? ? ? ?
I tried: TAB2[0][0] = 's'; *&TAB2[0][0] = 's'; for one char, and this does'nt work...
Probably I badly use pointers(?). Anyone help me?
 
     
     
    