Basically that, I am trying to to some stream manipulation,and I would like to be able to use the iterator classes provided, but I need to be able to work with the spaces, tabs, and newlines as well.
Does anyone know how this can be done?
Basically that, I am trying to to some stream manipulation,and I would like to be able to use the iterator classes provided, but I need to be able to work with the spaces, tabs, and newlines as well.
Does anyone know how this can be done?
One solution is istreambuf_iterator.
Kuphryn
Could you elaborate? I can't seem to get istreambuf_iterator to work, it gives errors about converting the argument to the constructor from a basic_streambuf to an istreambuf_iterator and more troubles about bad arguments to algorithms.
I've got my program almost the way I like it, it is basically a one pass stream editor (like sed) but using C++ objects and the only problem is that it strips out all the spaces when it works over a stream.
Stupid, stupid stupid...
Forgot about instream.unsetf(ios::skipws);
/bangs head against nearby wall
Ow my head