a beginner ask's for help

Hi guys. I decided to try C++ and i bought my book.
It's First program is the hello world program but i have problem's compiling it through dev-c++.

here's the code my book provides :

#include <iostream>
int main()
{ std::cout << "Hello World!\n";

Can someone tell me whats wrong with it and which compliler should i take to work

By the way problems occured with the Fifth Version of dev-c++ ( )

Thanks in advice! :) ( and sorry for my bad english )
Can you please give us the error from the compiler?

and which compliler should i take to work

Does this mean you have no compiler installed?!
Last edited on
@ Paul Combaldieu

thanks for reply

I use Dev-C++ 5 ( ) Beta

I rewrite my code and the program compiled without errors . But now i have another problem. My program closes immediately after opening.

What should i include to the code to fix it?

thanks in advice.
Do this:

#include <iostream>
using namespace std;

int main() { 

cout << "Hello World!\n";
return 0;

Dev-c++ can be a little picky.
@ toad1359

Thank you ! It worked out.
One last thing. If possible , can you tell me which compiler you recommend for a newbie / beginner like me? :)
Hi there,

For beginners (on windows) Code::Blocks is quite popular as a coding program.
It comes with a compiler and debugger integrated, so you don't have to worry about those when yu're just starting out.

All the best,
@ All
Thanks everyone! I really apriciate your replies.
best of luck to all of you
thanxxxxxxx! :)
The latest version of Dev C++ is 5.4.2
I highly recommend you upgrade.
I thought 5.4.2. was a beta.
5.4.2 is the latest release version - last update 25 May 2013 .

There is a newer version 5.4.3 which is a "release candidate", last update 27 September 2013 .
Topic archived. No new replies allowed.