Why won't my compiler work?

Is something wrong with my computer? I downloaded Codeblocks to begin learning C+ and for some reason when I try to run this

#include <iostream>

using namespace std;

int main()
cout << "HEY, you, I'm alive! Oh, and Heloo World!\n";

All I get is

Process returned 1997599881 <0x7710F489> execution time :0.058 s
Press any key to continue.

Then AVG detects a virus in the folder containing the project. What's going on? Can anyone help?
I'm betting your compiler is working correctly.

The program is running, very quickly printing your message, then immediately exiting.

Remember that the program will exit as soon as the main() function is done.

There's a whole sticky about this in the beginner forum:


Then AVG detects a virus in the folder containing the project.

Don't know what to tell you there. Either you have a virus or AVG is giving you a false positive.
Hmm... Well, Disch, my experience with Code::Blocks is that the default setting is that when it completes running code, it displays the return value (process return blah blah blah) without closing the console, or clearing it. What appears to be happening here isn't that your compiler is failing (you did set it so it knows what compiler to use, right?)... though to be quite honest, I just don't know what it is. Try using a different IDE and see whether the problem persists.
Topic archived. No new replies allowed.