CEGUI::String to std::string
Posted: Fri Dec 16, 2005 11:54
Hey,
I'm trying to conver a cegui::string to std::string and when I searched the forum I saw that std::string string( cegui::string.c_str() ) should work, but sadly it doesn't ...
Could someone help me plz
Using:
Ogre CVS
Cegui 0.4.0 Stable Src
MS Visual 7.1
Code (Where it goes wrong):
Callstack:
CEGUIBase_d.dll!CEGUI::String::build_utf8_buff() Line 117 + 0x3
CEGUIBase_d.dll!CEGUI::String::c_str() Line 1159
Sheathed Sword.exe!MenuState::saveOptions() Line 299 + 0x30
Sheathed Sword.exe!MenuState::bHandlerSaveOptions(const CEGUI::EventArgs & ceEvent={...}) Line 370
Sheathed Sword.exe!CEGUI::_memberBinder<MenuState,bool,CEGUI::EventArgs const &>::operator()(const CEGUI::EventArgs & args={...}) Line 102 + 0x12
CEGUIBase_d.dll!CEGUI::SubscriberTemplate<bool,CEGUI::EventArgs const &>::operator()(const CEGUI::EventArgs & args={...}) Line 120 + 0x15
Visual breaks in ceguistring.cpp @ line 117:
I'm trying to conver a cegui::string to std::string and when I searched the forum I saw that std::string string( cegui::string.c_str() ) should work, but sadly it doesn't ...
Could someone help me plz
Using:
Ogre CVS
Cegui 0.4.0 Stable Src
MS Visual 7.1
Code (Where it goes wrong):
Code: Select all
// Getting selected item from combobox
std::string sTest( comboRenderer->getSelectedItem()->getText().c_str() );
Callstack:
CEGUIBase_d.dll!CEGUI::String::build_utf8_buff() Line 117 + 0x3
CEGUIBase_d.dll!CEGUI::String::c_str() Line 1159
Sheathed Sword.exe!MenuState::saveOptions() Line 299 + 0x30
Sheathed Sword.exe!MenuState::bHandlerSaveOptions(const CEGUI::EventArgs & ceEvent={...}) Line 370
Sheathed Sword.exe!CEGUI::_memberBinder<MenuState,bool,CEGUI::EventArgs const &>::operator()(const CEGUI::EventArgs & args={...}) Line 102 + 0x12
CEGUIBase_d.dll!CEGUI::SubscriberTemplate<bool,CEGUI::EventArgs const &>::operator()(const CEGUI::EventArgs & args={...}) Line 120 + 0x15
Visual breaks in ceguistring.cpp @ line 117:
Code: Select all
...
utf8* String::build_utf8_buff(void) const
{
size_type buffsize = encoded_size(ptr(), d_cplength) + 1;
...