Problem

Discussion in 'C++' started by TuPLaD, Dec 28, 2004.

  1. TuPLaD

    TuPLaD Guest

    Yesturday, when i was learning C++, i made the following:
    =============
    ==main.cpp===
    =============
    #include <iostream.h>

    int main ()
    {
    cout << "Hello World!";
    return 0;
    }

    & when i compiled it was good, then i went to sleep.

    Ok, next day - i wake up, first thing i do, is start the file &
    compile right away (via cygwin).

    It gives me a error ...

    It gives me the following error::

    $ g++ main.cpp -o main.exe
    In file included from
    /usr/lib/gcc/i686-pc-cygwin/3.4.1/../../../../include/c++/
    3.4.1/backward/iostream.h:31,
    from main.cpp:1:
    /usr/lib/gcc/i686-pc-cygwin/3.4.1/../../../../include/c++/3.4.1/backward/backwar
    d_warning.h:32:2: warning: #warning This file includes at least one
    deprecated o
    r antiquated header. Please consider using one of the 32 headers found
    in sectio
    n 17.4.1.2 of the C++ standard. Examples include substituting the <X>
    header for
    the <X.h> header for C++ includes, or <iostream> instead of the
    deprecated head
    er <iostream.h>. To disable this warning use -Wno-deprecated.


    I'm confused lol ...

    i didnt edited anything

    after i got that error, i updated cygwin, i updated Dev-C++ ....

    still error :\
     
    TuPLaD, Dec 28, 2004
    #1
    1. Advertising

  2. TuPLaD

    gipsy boy Guest

    TuPLaD wrote:
    > Yesturday, when i was learning C++, i made the following:
    > =============
    > ==main.cpp===
    > =============
    > #include <iostream.h>
    >
    > int main ()
    > {
    > cout << "Hello World!";
    > return 0;
    > }
    >
    > & when i compiled it was good, then i went to sleep.
    >
    > Ok, next day - i wake up, first thing i do, is start the file &
    > compile right away (via cygwin).
    >
    > It gives me a error ...
    >
    > It gives me the following error::
    >
    > $ g++ main.cpp -o main.exe
    > In file included from
    > /usr/lib/gcc/i686-pc-cygwin/3.4.1/../../../../include/c++/
    > 3.4.1/backward/iostream.h:31,
    > from main.cpp:1:
    > /usr/lib/gcc/i686-pc-cygwin/3.4.1/../../../../include/c++/3.4.1/backward/backwar
    > d_warning.h:32:2: warning: #warning This file includes at least one
    > deprecated o
    > r antiquated header. Please consider using one of the 32 headers found
    > in sectio
    > n 17.4.1.2 of the C++ standard. Examples include substituting the <X>
    > header for
    > the <X.h> header for C++ includes, or <iostream> instead of the
    > deprecated head
    > er <iostream.h>. To disable this warning use -Wno-deprecated.
    >
    >
    > I'm confused lol ...
    >
    > i didnt edited anything
    >
    > after i got that error, i updated cygwin, i updated Dev-C++ ....
    >
    > still error :\


    Have you actually *read* the bloody error?

    --
    - gipsy boy
     
    gipsy boy, Dec 29, 2004
    #2
    1. Advertising

  3. TuPLaD

    Phlip Guest

    In future, consider more descriptive Subject lines!

    TuPLaD wrote:

    > Yesturday, when i was learning C++, i made the following:


    > #include <iostream.h>


    > & when i compiled it was good, then i went to sleep.
    >
    > Ok, next day - i wake up, first thing i do, is start the file &
    > compile right away (via cygwin).


    > d_warning.h:32:2: warning: #warning This file includes at least one
    > deprecated o r antiquated header. Please consider using one of the
    > 32 headers found
    > in section 17.4.1.2 of the C++ standard.


    During the night, elves snuck into your computer and upgraded the compiler.

    > Examples include substituting the <X>
    > header for
    > the <X.h> header for C++ includes, or <iostream> instead of the
    > deprecated head
    > er <iostream.h>. To disable this warning use -Wno-deprecated.


    Read what it says. Then write this:

    #include <iostream>
    ....
    std::cout << "hello world" << std::endl;

    --
    Phlip
    http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
     
    Phlip, Dec 29, 2004
    #3
  4. TuPLaD wrote:

    > Yesturday, when i was learning C++, i made the following:



    > cat main.cpp

    #include <iostream>

    int main(int argc, char* argv[]) {
    std::cout << "Hello World!" << std::endl;
    return 0;
    }

    > g++ -Wall -ansi -pedantic -o main main.cpp
    > ./main

    Hello World!

    It works just fine for me.
     
    E. Robert Tisdale, Dec 29, 2004
    #4
    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. Andreas Suurkuusk
    Replies:
    0
    Views:
    4,000
    Andreas Suurkuusk
    Jul 27, 2003
  2. Ted Miller
    Replies:
    0
    Views:
    5,179
    Ted Miller
    Sep 13, 2003
  3. Merek
    Replies:
    0
    Views:
    1,980
    Merek
    Dec 3, 2003
  4. Scott Meddows
    Replies:
    1
    Views:
    404
    John Saunders
    Jun 8, 2004
  5. Mike

    Problem problem problem :( Need Help

    Mike, May 7, 2004, in forum: ASP General
    Replies:
    2
    Views:
    558
    Bullschmidt
    May 11, 2004
Loading...

Share This Page