using iostream in gcc

Discussion in 'C++' started by Anirudh Ramesh, Apr 21, 2004.

  1. I need to use gcc for a competition. I'm pretty fluent in turbo c++.
    I'm using rhide as the ide for gcc. When I use iostream.h, i get an
    "antequated or deprecated header file. consider using one of the 32
    header files found in section 17.4.1.2of the C++ standard." When I
    just use iostream, i get a messasge similar to "the functions cin and
    cout are undefined." I need help quickly.
    Anirudh Ramesh, Apr 21, 2004
    #1
    1. Advertising

  2. Anirudh Ramesh

    Sharad Kala Guest

    "Anirudh Ramesh" <> wrote in message
    news:...
    > I need to use gcc for a competition. I'm pretty fluent in turbo c++.
    > I'm using rhide as the ide for gcc. When I use iostream.h, i get an
    > "antequated or deprecated header file. consider using one of the 32
    > header files found in section 17.4.1.2of the C++ standard." When I
    > just use iostream, i get a messasge similar to "the functions cin and
    > cout are undefined." I need help quickly.


    Everything in standard headers like <iostream> is inside std namespace, hence
    it's std::cin and std::cout .
    btw, cin and cout are not functions.
    Sharad Kala, Apr 21, 2004
    #2
    1. Advertising

  3. Anirudh Ramesh wrote:

    > I need to use gcc for a competition. I'm pretty fluent in turbo c++.
    > I'm using rhide as the ide for gcc. When I use iostream.h, i get an
    > "antequated or deprecated header file. consider using one of the 32
    > header files found in section 17.4.1.2of the C++ standard." When I
    > just use iostream, i get a messasge similar to "the functions cin and
    > cout are undefined." I need help quickly.


    Here it is! The new headers define cin and cout in a *namespace* std. If
    you want to use them, write
    std::cout << 5;
    or similar; or, if you want to use std:: everytime without having to
    write it,
    using namespace std;
    at global scope.

    --
    Michael Schutte
    Remove the X'es to reply per eMail.
    Michael Schutte, Apr 30, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Tiger
    Replies:
    10
    Views:
    5,558
  2. Juergen Marsch
    Replies:
    1
    Views:
    1,300
    Asfand Yar Qazi
    Jun 21, 2004
  3. ai@work
    Replies:
    9
    Views:
    528
    Ron Natalie
    Dec 16, 2004
  4. S. Nurbe

    iostream + iostream.h

    S. Nurbe, Jan 14, 2005, in forum: C++
    Replies:
    7
    Views:
    755
    red floyd
    Jan 15, 2005
  5. red floyd
    Replies:
    3
    Views:
    524
    Dietmar Kuehl
    Mar 8, 2005
Loading...

Share This Page