Yes, that should work. You could also just do:

double a = atof(myString.c_str());

They are syntactically the same.

Kevin

On Tue, Aug 14, 2012 at 3:55 PM, Rodrigo Nunes <[email protected]> wrote:

> This method work?
>
> Glib::ustring testUString("1.23456789");
> char * UStringToCharArray = testUString.c_str();
> double floatingPoint = atof(UStringToCharArray);
>
>
>
> 2012/8/14 Kevin Brightwell <[email protected]>
>
>> You can also use the usting::c_str() to access the underlying C-style
>> string to pass to atoX methods.
>
>
>


-- 
Kevin Brightwell
*Year 4 Bachelor of Computer Engineering (BESc.)
Year 3 Bachelor of Computer Science (BSc.) *
Residence Don - Saugeen-Maitland Hall
Western University www.westernu.ca <http://www.uwo.ca>
e. [email protected] c. 226.678.4927
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to