Support Forums

Full Version: How do I compile? >.<
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay so I'm starting to learn how to work in c++ and I've been using notepad++ to do so. My problem now is how do I turn my source code into a .exe, is there a command I can run or do I need an IDE, if so what's the best on to use?
Get an IDE. My personal choice is THIS
Install it and make it default for C/C++ source files.

Make sure your source code ends with the extension .cpp

Double click on it and open it with Codeblocks. Then you will have an option of build and run.That's how your source will get compiled into .exe.
I've downloaded and installed it but when I try to run/compile it I get errors saying crap about the compiler. Is there an massive guide that goes through it all?
The re-check your codes and fix the error and compile again.
As I said before ven0m, I'm getting errors about the compiler not the code.
I'm pretty sure this has no errors, correct it if I'm wrong:
Code:
#include <iostream>
using namespace std;

int main()
{
    cout << "Hello World";

    return 0;
}
IDK what seems to be the problem.When I ran it, it went good.
(08-12-2012, 10:47 AM)ven0m Wrote: [ -> ]IDK what seems to be the problem.When I ran it, it went good.

I know the code is fine, as I said it was a problem with code blocks. But I'm using dev-C++ or something now and it all works fine.
Great to know your problems are fixed. Dev C++ is a good IDE too.