Sign in to follow this  
Cedric_

Typecasting string to char [SOLVED]

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
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

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