What does this mean?

Hey guys! I wanted to start programming a simple 2D "Hello World" with SDL but I don't understand one this : "*". What does the symbol * mean? It's used in so many places when programming graphics and stuff, and nowhere does anyone say what it is and what it means. Is it so easy and I'm just stupid to have missed it? Many thanks! :)

 
 SDL_Window* window = NULL;
Last edited on
It means that window is a pointer to a SDL_Window.

So the next step for you is to learn about pointers ;)
OHH I see. Thanks! I thought it was a pointer, but I wasn't sure becaus I didn't learn em yet haha. Ty again! Time to learn them! XD
Thanks!
Try watching this:

http://www.3dbuzz.com/training/view/c-plus-plus-complete/intermediate-techniques/introduction-to-pointers


Why do they keep saying * is the reference and & is the dereference operator? Isn't it the other way around?
That's a sign of tutorials that are of poor quality. I wouldn't recommend using that tutorial, but the one on this site. And instead of the NULL macro you should be using nullptr.
Last edited on
Topic archived. No new replies allowed.