jeudi 27 septembre 2018

Lost in a world of pointers

Please help me, i'm not being able to understand how this code is working. I just can't seem to visualize it in my head. An elaborative explanation could save me the trouble of being a failure in life in the future.Thank you.

int **data = new int*[row];

    for(i=0;i<row;i++)
        data[i] = new int[col];

    for(i=0;i<row;i++)
    {
        for(j=0;j<col;j++)
        {
            data[i][j] = rand() % u;
        }
    }

Aucun commentaire:

Enregistrer un commentaire