Jamiil Abduqadir wrote:
Hello everyone
Can someone tell me how to erase the first character in a string?
...
Glib::ustring str("Hola");
str.erase(1,0); // erase one character at position zero
std::cout << str << std::endl; // ola
with this code I get a run time error, can anybody help?
The problem I think is in your second argument to erase() (which should be > 0). If you want to look, the docs for ustring (which is very helpful) is at: http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html. <http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ustring.html>
-Jose
Thanks --Happiness has many doors, and when one of them closes another opens, yet we spent so much time looking at the one that is shut that we don't see the one that just opened.------------------------------------------------------------------------ _______________________________________________ gtkmm-list mailing list gtkmm-list gnome org http://mail.gnome.org/mailman/listinfo/gtkmm-list