Re: Glib::ustring conversion



If memory serves me right, The C++ Programming Language by Bjarne
Stroustrup has an example of the parser for the calculator in the first
or second chapter. You might want to check it out.

-Vlad

On Thu, 2005-10-13 at 11:39, Arthur wrote:
> Hi there.
> 
> I'm building a simple calculator with Glade(mm) and I would like to know 
> if it is possible to convert Glib::ustring to double and then double to 
> Glib::ustring.
> I need this because the calculator has an entrytext widget and when I 
> press the numbers and signs (plus, minus, multiply, divide, left 
> parenthesis and right parenthesis) a string is shown at this entry text: 
> "1254 + 13241 - (13241 * 1341)". When the equal button (=) is pressed I 
> want to pass this string as a double and make C++ to solve this 
> mathematic expression for me and return the result, so I can set it as 
> the entry text string again.
> 
> If anyone could help me, I would appreciate.
> 
> Regards,
> 
> Arthur
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
-- 
_____________________________________________________________
Vladislav Grinchenko       http://home.comcast.net/~3rdshift/
                                 e-mail: 3rdshift comcast net
                                                   
      Focus on quality, and productivity will follow.
_____________________________________________________________




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