I am using strings to read in from a text file using getline.
I am trying to print this string to the screen using the allegro game library calling the function textout_ex.
textout_ex
It requires a const char *s ..im using string.. can I convert it?
This is a discussion on convert string to const char? within the C++ Programming forums, part of the General Programming Boards category; I am using strings to read in from a text file using getline. I am trying to print this string ...
I am using strings to read in from a text file using getline.
I am trying to print this string to the screen using the allegro game library calling the function textout_ex.
textout_ex
It requires a const char *s ..im using string.. can I convert it?
if you mean the you are using std::string then yes, std::string::c_str() will give you a character array.
That worked.
Thank you. I am starting to realise that C and C++ integrate quite a bit.
wow i'm doing allegro too, when I saw the textout_ex() i immediate recognised it!
we have to read from a file to receive points for playerObjects.
good luck man![]()