On Thursday, 24 February 2005 17:43, Dave Culp wrote:
> #include <iostream.h>
>
> main()
> {
>   cout << "Hello World!" << endl;
>   double x;
>   x = x + x;
>   return 0;
> }

You'll have to do it this way :
==========================
#include <iostream>

using namespace std;

main()
{
  cout << "Hello World!" << endl;
  double x;
  x = x + x;
  return 0;
}
==========================

Notice that I took the .h out of the header - this is the way to specify 
standard C++ library headers nowdays.

Also you have to specify the namespace otherwise the compiler won't know where 
to find the cout and endl functions.

You can either use "using namespace std;"
or you can do it explicity over and over again like this :
std::cout << "Hello World!" << std::endl;


Regards
Paul

_______________________________________________
Flightgear-users mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-users
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to