Re: [gtkmm] Glib::ustring -> int
- From: Matjaz Subelj <matjaz lecad uni-lj si>
- To: "Benjamin A. Cooper" <bacooper bacwater net>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Glib::ustring -> int
- Date: Wed, 04 Sep 2002 10:39:06 +0200
Glib::ustring.c_str() returns `const char*' you can use.
It's all in the documentation.
--matjaz
Benjamin A. Cooper wrote:
This may be a dumb question, but I am new to C++ and to gtkmm, as well
as GTK+ in general.
I have a Glib::ustring (returned from one of the widgets) I want to
convert it to an integer for use elsewhere in my program.
I tried the standard C function "atoi" but it does not work, I get the
following error:
cannot convert `Glib::ustring' to `const char*' for argument `
1' to `long int atol(const char*)'
How do I get an int from the string (and a float as well)?
_______________________________________________
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]