User forums > Help

Newbie learning to program in C++

(1/1)

chipppy:
Good Evening

I am a newbie starting to learn to program in C++.  A runing Ubuntu 9.04 and have install Code::Blocks

I am trying to do the classic "hello World" thing, to try and learn how to use C::B.  I am learning from an EBook.
I started a new C++ project and entered the following code


--- Code: ---#include <stdlib.h>
#include <iostream.h>

int main()
{
cout << "Hello World!";
return 0;
}
--- End code ---

When I click build I get the following

--- Code: ---2     error: iostream.h: No such file or directory
      In function ‘int main()’:
6     error: ‘cout’ was not declared in this scope
      Build finished: 2 errors, 0 warning

--- End code ---
I am unsure what I am doing wrong here.  This should be a simple one.

Any help is greatly appreciated.

cheers
chipppy

Jenna:
Read your book carefully and/or ask in a c++ forum.

This forum is dedicated to C::B related problems and is not a general programming forum.

Topic locked !!

Navigation

[0] Message Index

Go to full version