S
Sharad Kala
Angel said:hi there all, i have started to teach, myself c++, i have found a book
online but one problem, it was written in for use with at the time
mandrake 6 i have mandrake 9.2, at which i thought would work but i am
getting compiler error. i am using gcc to compile it.
here is the code and the error.
#include <iostream.h>
int main()
{
cout << ?Welcome to GNU C++ for Linux programming!? << endl;
return 0;
}
the error is
#warning This file includes at least one deprecated or
antiquated header.
Hi,
#include <iostream.h> is a non-standard header.
The standard header is <iostream> (No .h extension)
Also everything in these headers is wrapped inside the std namespace.
So the correct way to code your program is -
#include <iostream>
int main()
{
std::cout << "Hello World";
return 0;
}
I would recommend "Accelarated C++" by Koenig & Moo.
Check out http://accu.org for book recommendations.
Best wishes,
Sharad