
13 Feb
2008
13 Feb
'08
8:15 p.m.
Hi, I've the following code: namespace io = boost::iostreams; bool foo::open( const std::string& file ) { io::filtering_istream is; is.push( my_line_filter() ); is.push( io::file_source( file ) ); // ??? how to check success do { std::string line; std::getline(is, line); std::cout << line << std::endl; } while (!is.eof()); return true; } Well, how can I check that the file is opened correct/the stream is valid? is_open() and good() seems not supported? Or I'm wrong? Giving a wrong name does nothings. Thanks, Olaf