Jump to content
  • Advertisement
Sign in to follow this  

Allegro Strings

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

I can't use strings with textout_ex();! Excuse my semi-colon, I can't make myself type a C++ function without one... :(... anyway, How can I use/display strings when using allegro. Please help, this problem has been troubling me for monthes! Not having the internet at home sucks...

Share this post


Link to post
Share on other sites
Advertisement
I assume you mean std::string.

In this case, you can use the c_str() method from the std::string class which will convert your string to a char array.


std::string t = "Hello World !";

textout_ex( the_bmp, the_font, t.c_str(), 10, 10, makecol( 255, 255, 255 ), -1 );




hope that helps !

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!