I was randomly looking at Lazy Foo's tuts, and I noticed his load_image function is a pointer.
What I don't understand is, why would you make a function itself a pointer? Keep in mind I have a basic understanding of C++(I thought I understood pointers quite well, but apparently not).
My guess is that hes assuming you will be using that function inside another function
Code: Select all
funcFunction(&load_image) //Doesnt quite make sense
or its the equivalent of this:
Code: Select all
SDL_Surface load_image(std::string *filename )
or maybe it can be used like this
to translate into this
Also, I have no idea what/how to use STL, so if it is indeed STL, let me know and I'll find out my answer when I get sams C++ in 21 days.