c++ compliling problem

hello,

im trying to print a simple "hello world" program in c++ in unix.
i get the following error . im new to c++ .

# include <iostream.h>
int main()
{
cout<<"hello world";
}

this is the error i get :

In file included from /usr/local/include/c++/4.1.1/backward/iostream.h:31,
from abc.cpp:1:
/usr/local/include/c++/4.1.1/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 <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/local/include/c++/4.1.1/iosfwd:49,
from /usr/local/include/c++/4.1.1/ios:43,
from /usr/local/include/c++/4.1.1/ostream:44,
from /usr/local/include/c++/4.1.1/iostream:44,
from /usr/local/include/c++/4.1.1/backward/iostream.h:32,
from abc.cpp:1:
/usr/local/include/c++/4.1.1/bits/postypes.h:49:35: error: stdint.h: No such file or directory

Like it says, try #include <iostream> instead of #include <iostream.h>

Also, above main, you should usually have using namespace::std

yep i did try , there is some problem with finding stdint.h , so for the time being im using stdio.h just to print n get values , rest of it is fine . thanks :slight_smile:

It not finding stdint.h is odd. That header is a relatively recent innovation, which suggests your C headers may be out of date while your iostream library is not..