compiler issues

I am new to this but I have written enough stuff in html to know something is wrong. I downloaded and installed the Code::Blocks 10.05 and ran the simple code of "Hello World". It gives me an error both in the code but will run but then there is an error message there also. Does anyone know if there is something wrong with that compiler?

Blessings!
Richard
Code::Blocks is not a compiler. It is an IDE that makes it easy for you to use a compiler. It will work with a wide variety of compilers. The problem is almost certainly not with your compiler.

Note that Code::Blocks expects you to provide the compiler, or (if using windows) you can download the version of Code::bocks that comes bundled with a compiler. On the assumption that you're using windows, did you download the version that comes with a compiler, or have you provided one to Code::Blocks?

What are the error messages?
Last edited on
Can we see your code please, put it inside code tags, [code_] //code goes here [/code_] without the underscores. Codeblocks isn't a compiler, it's an IDE (Integrated development environment), it comes with gcc by default. What is the error message it gives?
Ok, so it isn't a compiler, what is the build/rebuild then play portion of Code:Blocks? Where do I get a compiler?

The code is:
#include <iostream>

using namespace std;

int main()
{
cout << "Hello world!" << endl;
return 0;
}

The error message is: Process return 0 <0x0> excution time:

Now that I look at that it may not be an error message. Is there a clear command like there was in basic programming that will clear the process return message.

Blessings!
Richard
Ok, so it isn't a compiler, what is the build/rebuild then play portion of Code:Blocks?

It invokes the compiler you selected.

Where do I get a compiler?

You already have GCC if you installed the Code::Blocks+MinGW package.

The error message is: Process return 0 <0x0> excution time:

That's not an error, it indicates that the program ran successfully.

Press F9 (build & run) when you want to start your program.
closed account (3hM2Nwbp)
Process return 0 <0x0>


Indicates that your program returned a value of 0 to the operating system. (Ran Successfully)

This means that your compiler is working, and your program compiled and ran fine. I think that code::blocks has an option to keep the console open after the program ends, but can't remember it off-hand.

Good Luck

* - I'm both the ninja and ninja'd here. First time for everything.
Last edited on
That is code blocks telling you that it returned 0, as seen by the line return 0;
Before the return 0, you can add cin.sync(); cin.ignore(); and it will stay open until you hit enter.
Code::Blocks keeps the console open anyway, so there's no need to do that.
You'd just have to press enter twice.
Topic archived. No new replies allowed.