Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Pointer to an array of pointers.

Name: Anonymous 2007-09-13 21:24 ID:Ly++VlgN



    int lol = 3;
    int *lol_ptr = &lol;

    int *ptr_array;
    ptr_array = malloc(sizeof(lol_ptr));

    ptr_array[0] = lol_ptr;

    printf("%d\n", (*(*ptr_array[0])));


gcc gives the following error:

error: invalid type argument of 'unary *'

Halp.

Name: Anonymous 2007-09-13 21:35 ID:WydlcVYj

fag

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List