Re: [OFF] Convert int to ustring



Are you sure this solution is adequate speedwise?  Unless there has been an
improvement recently, the stringstream support seems fairly slow, on gcc
at least.

Would it make more sense to use sprintf instead?


Regards,

Nickolai



On Sun, Oct 30, 2005 at 01:56:10AM +0200, Vinzenz 'evilissimo' Feenstra wrote:
> 
> #include <sstream>
> 
> int num = 1000;
> Glib::ustring str;
> std::stringstream strstr;
> strstr << num;
> strstr >> str;
> Now str contains a string "1000"
> 
> Jupercio Juliano schrieb:
> 
> >    Hi all.
> >    Sorry for the off and the newbie question, but I need to know how 
> >to convert an int to ustring.
> >
> >    Thanks for any help.
> >
> 
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]