Well, the subject says it all basically.
I have a command line utility that can be used interactively or in scripts using pipes or I / O redirection. I use cinit coutfor i / o, and I want to write an additional EOL at the end if the output is console, so the user request will start on the next line. Inside the scripts this would be harmful.
Can it be considered cin == 0, cout == 1? I understand that there is no clean way to get a file descriptor for a stream. Or that?
davka source
share