defaulting ifstream variable to standard input
Can anyone tell me what must be a fairly standard incantation?
About a decade ago I wrote
inputStream is NULL unless a filename has been specified on the command line. The attach() function that was available with that compiler allowed me to use this program as part of a pipeline.
if (NULL == inputStream)
inputStream = "stdin";
who -a | sortByDate
I haven't really used C++ since then and the attach() function seems to have been an extension that isn't available today. I can't simply do can I?