Skip to main content
gamedev.net
🔒 Locked

String question

Started by Sir Sapo Nov 27, 2005 at 7:50 PM 1 replies 600+ views
Original Post
Sir Sapo
Sir Sapo
Hey everyone, Is there anyway to convert a string into a const char*? I'm using GLUT popup menus in a little editor I wrote for a game I'm making, and I'm trying to have the popup menus contain buttons that are defined in an outside file. The problem arises when I try and create the sub menu buttons because the information for the button's name is saved as a string, but the function that creates the menu requires a const char *. Thanks in advance.
My Current Project Angels 22 (4E5)
SiCrane
SiCrane
Assuming std::string, use the c_str() member function.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.