Thread: input/output streams

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    30

    input/output streams

    Why when we pass output/input streams to functions, we have to pass by reference?

    Thanks.

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    because they cannot be copied maybe?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  3. #3
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    937
    Because they cannot be copied.
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Writing to two streams: va_arg issues
    By dwks in forum C Programming
    Replies: 2
    Last Post: 09-26-2007, 10:14 AM
  2. Input/Output Streams
    By mikeprogram in forum C++ Programming
    Replies: 6
    Last Post: 12-23-2005, 02:58 PM
  3. input/output
    By JCK in forum C++ Programming
    Replies: 4
    Last Post: 11-30-2002, 12:07 PM
  4. Independent streams of pseudo random number generator
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-15-2001, 05:32 AM
  5. File Streams, new error on me.
    By Eber Kain in forum C++ Programming
    Replies: 2
    Last Post: 11-03-2001, 08:28 PM