Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2006-08-04 04:51:05


Tommy Li wrote:
> Great. Thanks a ton. The problem I was having was that I was using
> getline to read from stdin, which stripped the newlines (duh).
> Changing it to while(!cin.eof()) input.append(1, cin.get()); fixed it.
>
> By the way, do you have a better way of reading the entire stream,
> including newlines, into a string?

If you grep the Boost.Regex examples for "file" you'll find some possible
examples.

John.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net