ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
when I woke up in the morning I usually will try to compile my hello world program( nice intro huh?). In my RH8 machine, it compile but it gave me backward warning like this..
/usr/include/c++/3.2/backward/backward_warning.h:32:2: warning: #warning This file 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 <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
It seems like iostream.h is obsolete. So I tried to remove the .h like the warning suggested, but it didn't work. My code can't recognize my "cout" when I remove the .h in my #include <iostream.h>.....
Whenever you use the new standard C++ library without ".h", you have to put the "std::" infront throughout your code.
For example,
#include <iostream>
main() {
std::cout << "hello\n";
return 0;
}
If you don't want to put "std::" throughout the program, you can write the line "using namespace std;" just below your header file declaration.
For example,
I was fumbling with the same problem and when I poked around I found the old compiler named as g++296 sitting there which does not give the above warning. Any ways, now I know why the code is not working for the new compiler
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.