Name: Anonymous 2010-07-19 16:29
Hey guys, I'm having some trouble with pointers in C++
Lets say we are setting up an SDL surface
SDL_Surface *screen;
Why do we make it a pointer? I looked in the header file for SDL_Video and SDL_Surface is a struct! So that means we are pointing to a struct, but then how are we able to do this?
screen = SDL_SetVideoMode(...);
So yeah my question is basically, how does pointing to a struct work?
Lets say we are setting up an SDL surface
SDL_Surface *screen;
Why do we make it a pointer? I looked in the header file for SDL_Video and SDL_Surface is a struct! So that means we are pointing to a struct, but then how are we able to do this?
screen = SDL_SetVideoMode(...);
So yeah my question is basically, how does pointing to a struct work?