Problem

T

TuPLaD

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 :\
 
G

gipsy boy

TuPLaD said:
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?
 
P

Phlip

In future, consider more descriptive Subject lines!
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;
 
E

E. Robert Tisdale

TuPLaD said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top