Re: How to convert Glib::ustring to float or double



This method work?


Glib::ustring testUString("1.23456789");
char * UStringToCharArray = testUString.c_str();
double floatingPoint = atof(UStringToCharArray);


2012/8/14 Kevin Brightwell <kevin brightwell2 gmail com>
You can also use the usting::c_str() to access the underlying C-style string to pass to atoX methods.



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