input/output streams

This is a discussion on input/output streams within the C++ Programming forums, part of the General Programming Boards category; Why when we pass output/input streams to functions, we have to pass by reference? Thanks....

  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
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,471
    because they cannot be copied maybe?
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  3. #3
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    902
    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, 01:58 PM
  3. input/output
    By JCK in forum C++ Programming
    Replies: 4
    Last Post: 11-30-2002, 11:07 AM
  4. Independent streams of pseudo random number generator
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-15-2001, 04:32 AM
  5. File Streams, new error on me.
    By Eber Kain in forum C++ Programming
    Replies: 2
    Last Post: 11-03-2001, 07:28 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21