Author Topic: Newbie learning to program in C++  (Read 4050 times)

chipppy

  • Guest
Newbie learning to program in C++
« on: June 18, 2009, 04:45:37 pm »
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;
}

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
I am unsure what I am doing wrong here.  This should be a simple one.

Any help is greatly appreciated.

cheers
chipppy

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Newbie learning to program in C++
« Reply #1 on: June 18, 2009, 04:51:48 pm »
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 !!