• Advertisement
Sign in to follow this  

Typecasting string to char [SOLVED]

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

Hi, I've been searching the net for some help about typecasting a string to a char, but I've failed to find anything that could really help me. Although I sure found lots of information, I pretty much got drowned in it. So I thought I'd ask here instead, knowing there's almost always someone kind and helpful here! Thanks in advance for any help you could lend me! If you know any good documentation on typecasting in general, that would be very kind to. Edit: Forgot, language is c++.

Share this post


Link to post
Share on other sites
Advertisement
Perhaps you're looking for the c_str() function? Otherwise you might describe what you're trying to do (I'm guessing that typecasting per se probably isn't what you're looking for).

Share this post


Link to post
Share on other sites
Why.. That is EXACTLY what I was looking for! :)
I instantly remembered it as I saw it, thank you very much for you help!

I was only trying to convert the string I used to link images with the SDL Surface. And I had to convert the string to char for the Load_BMP() funktion.

Share this post


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

  • Advertisement