Sign in to follow this  

SDL game

This topic is 2485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

SDL_LoadBMP() does what the name implies, it loads a Windows or OS/2 Bitmap and returns a pointer to an SDL_Surface that contains the image data in a form usable by other SDL functions.
filename is an instance of the string class, c_str() is a method within the string class that return the contents of the string as a const char* which is required since SDL_LoadBMP will only except const char * as it's prototype is SDL_Surface *SDL_LoadBMP(const char *file);

DEV-C++ is horribly out of date and buggy I recommend you switch to the express edition of Microsoft's Visual C++ Or Code::Blocks.

Share this post


Link to post
Share on other sites
thanks for the reply..another doubt...what did u meant by c_str() is a method within the string class that return the contents of the string as a const char*..
[quote name='prh99' timestamp='1298364920' post='4777447']
SDL_LoadBMP() does what the name implies, it loads a Windows or OS/2 Bitmap and returns a pointer to an SDL_Surface that contains the image data in a form usable by other SDL functions.
filename is an instance of the string class, c_str() is a method within the string class that return the contents of the string as a const char* which is required since SDL_LoadBMP will only except const char * as it's prototype is SDL_Surface *SDL_LoadBMP(const char *file);

DEV-C++ is horribly out of date and buggy I recommend you switch to the express edition of Microsoft's Visual C++ Or Code::Blocks.
[/quote]

Share this post


Link to post
Share on other sites
Between this and your other thread it is clear that you do not yet understand the basics of C++. Delving into SDL at this point will likely be confusing and counter productive for you. I would advise you look into a good book on C++ and try get comfortable with the language itself. This generally involves writing lots of console programs to get used to the syntax and semantics of the language.

Share this post


Link to post
Share on other sites

This topic is 2485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this