std::getline and ustring

View: New views
2 Messages — Rating Filter:   Alert me  

std::getline and ustring

by Jamiil :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey kids!
Currently I am working on porting some libraries to be GTKmm exclusive,
everything has been going well with the exception of one wrincle.
This class reads data from a file using std::getline(std::fstream f,
std::string data, "^")
Well, as you know, getline expects a std::string variable *not a
Glib::ustring, does anyone around here knows how to go about  making
std::getline and Glib::ustring work together?

TIA

--


_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Re: std::getline and ustring

by Jim Hodapp-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Couldn't you at the very least read with getline into a std::string  
and then transfer the string into a Glib::ustring? Glib::ustring will  
create a new string from a std::string.

Jim


On Oct 8, 2009, at 8:40 PM, ArbolOne wrote:

> Hey kids!
> Currently I am working on porting some libraries to be GTKmm  
> exclusive, everything has been going well with the exception of one  
> wrincle.
> This class reads data from a file using std::getline(std::fstream f,  
> std::string data, "^")
> Well, as you know, getline expects a std::string variable *not a  
> Glib::ustring, does anyone around here knows how to go about  making  
> std::getline and Glib::ustring work together?
>
> TIA
>
> --
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list@...
> http://mail.gnome.org/mailman/listinfo/gtkmm-list

_______________________________________________
gtkmm-list mailing list
gtkmm-list@...
http://mail.gnome.org/mailman/listinfo/gtkmm-list