hi,
how does a program know whether some data are available from stdin?
I would like to make a program which could read its data from stdin
and _if_there_is_nothing_at_stdin_ from a file which name is given
as an argument. If there is nothing in stdin and no filename is given as
argument, the program should quit immediatly (not wait.)
I'm on Linux with gcc (g++ in fact.)
TIA if any idea.
Samuel