Hi,
How do you transform a CEGUI::String to std::string.
I 'm trying to catch an Cegui::exception, and write it in my log...
thanks
CEGUI::String
Moderators: CEGUI MVP, CEGUI Team
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: CEGUI::String
Use the "CEGUI::String::c_str" member to get a C string version of the "CEGUI::String" content.
HTH
edit:
Code: Select all
CEGUI::String cs("test");
std::string s(cs.c_str());
cout << s << endl;
HTH
edit:
Code: Select all
catch (CEGUI::Exception& e)
{
std::string s(e.getMessage.c_str());
std::cout << s << std::endl;
}
This method only works for CeGUI generated exceptions, but it doesn't work for general CEGUI::String to std::string conversion.
You can see the details here with a small source code to test it : http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1206
Regards,
Pacôme
You can see the details here with a small source code to test it : http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1206
Regards,
Pacôme
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 3 guests