Assigning cout to a variable name

后端 未结 7 1536
旧时难觅i
旧时难觅i 2020-12-14 20:26

In ANSI C++, how can I assign the cout stream to a variable name? What I want to do is, if the user has specified an output file name, I send output there, otherwise, send i

7条回答
  •  悲哀的现实
    2020-12-14 21:07

    You can find a very detailed explanation of how to do this here: http://groups.google.com/group/comp.lang.c++/msg/1d941c0f26ea0d81?pli=1

    Hopefully someone will write this up more clearly for stack overflow to take the points...

提交回复
热议问题