File streaming

This is a discussion on File streaming within the C++ Programming forums, part of the General Programming Boards category; is there a way to edit a file without having to store the whole file into a buffer then edit ...

> is there a way to edit a file without having to store the whole file into a buffer then edit then write back to the file??
Like for example 'sed', which reads in a line, decides what to do about it based on a bunch of rules you specify, then optionally writes out a (modified) line.