Advertisement Jump to content
Sign in to follow this  
TIMPAN

Alt dir

This topic is 4914 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

Why cant I do like this ? SDL_Surface* Picture = SDL_LoadBMP("DATA\GRAPH\BloodyORBITlogo.bmp"); but do like this ? SDL_Surface* Picture = SDL_LoadBMP("BloodyORBITlogo.bmp"); I have tried pretty much anything I could do ... like copying the hole DATA\GRAPH\... folder into the debug folder.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
try:

SDL_Surface* Picture = SDL_LoadBMP("DATA\\GRAPH\\BloodyORBITlogo.bmp");

Share this post


Link to post
Share on other sites
The backslash character is the escape character, so you need to escape it itself.
Rather than use the backslash and the doubled-up \\, why not just switch to using forwards slashes?
SDL_Surface* Picture = SDL_LoadBMP("DATA/GRAPH/BloodyORBITlogo.bmp"); would work just as well.

Share this post


Link to post
Share on other sites
In C#, you can do something like this: SDL_LoadBMP(@"DATA\GRAPH\BloodyORBITlogo.bmp");

The @ before the string lets the compiler know that you don't want it to read the escape characters.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!