Thread: #include <iostream> ?

  1. #1
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    #include <iostream> ?

    When I include <iostream> instead of iostream.h, I put in using namespace std. Then my compiler (Borland), gives me an error saying:

    Error: test.cpp(5,1):Namespace name expected

    But I get no error with normal iostream.h . It is very discouraging to try to get used to iosteam, while getting the same error over&over!


    Stan The Man
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    which borland compiler?

  3. #3
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361
    5.02
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    hmm...don't get that error with 5.5; sorry, i can't help you, maybe someone else can.

  5. #5
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    How are you putting the line in? It sounds like this is what you're doing:
    Code:
    using namespace std
    It should be:
    Code:
    using namespace std;
    Just making sure
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  6. #6
    I am he who is the man! Stan100's Avatar
    Join Date
    Sep 2002
    Posts
    361

    Thx

    Thx Hunter, I'm so stupid!
    Stan The Man. Beatles fan

    When I was a child,
    I spoke as a child,
    I thought as a child,
    I reasoned as a child.
    When I became a man,
    I put childish ways behind me"
    (the holy bible, Paul, in his first letter to the Cor. 13:11)

  7. #7
    The Pantless Man CheesyMoo's Avatar
    Join Date
    Jan 2003
    Posts
    262
    Mine does that even when I enter it correctly, stupid peice of crap...

  8. #8
    older versions of borland can't use the new header files.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. include <iostream> appearing red
    By Tachimazu in forum C++ Programming
    Replies: 3
    Last Post: 06-21-2009, 10:59 PM
  2. 2d game
    By JordanCason in forum Game Programming
    Replies: 5
    Last Post: 12-08-2007, 10:08 PM
  3. MFC include BS
    By VirtualAce in forum Windows Programming
    Replies: 4
    Last Post: 10-31-2005, 12:44 PM
  4. dont konw what to do next.
    By negevy in forum C Programming
    Replies: 29
    Last Post: 09-09-2005, 03:06 PM
  5. #includes don't seem to be working
    By Inquirer in forum C++ Programming
    Replies: 12
    Last Post: 08-05-2002, 05:38 PM