Re: [gtk-list] Gtk--: Stupid string-->char conversion question



In message <OFAEE275E3.2F9A36F6-ONC125679E.004B688B@peoplesoft.com>you write:
>Hi,
>
>I'm using Gtk-- and seem to have some odd behaviour
>when reading data from entry boxes. Here's what I'm doing
>to get the resulting input value:
>
>     char *fname = (char *) (d_fileSelection->get_filename().data());

Assuming that the rval is a string or string&, use

      char *fname = d_fileSelection->get_filename().data().c_str();

There is no builtin cast to (char *) for the string class.

--p



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