C++ Compiling Problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all!

I've started learning C++. (Should I first learn C ?)

I have an eBook from SAMS Teach yourself C++ in 21 days
When I compiled their Hello World example:

1: #include <iostream.h>
2:
3: int main()
4: {
5:    cout << "Hello World!\n";
6:        return 0;
7: } 

g++ came back with:
In file included from /usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/backward/iostream.h:31,from hello.cpp:1:
/usr/lib/gcc/i386-redhat-linux/3.4.2/../../../../include/c++/3.4.2/backward/backward_warning.h:32:2: warning:
#warning Thisfile includes at least one deprecated or antiquated header. Please consider using one of the 32 headers
found in section 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 header <iostream.h>. To disable this warning use -Wno-deprecated.

But the a.out file that gets created, does work, and
gives Hello World! on the console.
Should I worry about this warning?

They also say in the eBook that I still need to run the 'linker' on the file that is compiled,
but the a.out file already works? When I ran 'ld a.out' it did not work anymore.
Why do I not need to run the linker?



Kind regards,
Coert

__________________________
Another proud FC3 Linux user!!


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux