C++ Streams.

al28044 at ggr.co.uk al28044 at ggr.co.uk
Fri Jun 11 04:24:00 EST 1993

Dear All,

     One of the things I liked about C io <stdio.h> was that a program
could do things on a stream without knowing if it was connected to a file
or to a standard stream (stdin, stdout & stderr).

     This is very useful for writing a program like more which can either
pick up a file from the command line and open it or take standard input.

     What is the best way of getting the same effect in C++ where, for
example,  cin is a different class (istream) from a file opened for input

     I cannot find anything in Stroustrup so I have thought of some ways
myself but they are not very elegant!

Thanking you in advance for your time,


More information about the Bio-soft mailing list

Send comments to us at biosci-help [At] net.bio.net