Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I compile? >.<
#1
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?
Reply
#2
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.
[Image: 3dtextven0mhf.png]
Reply
#3
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?
Reply
#4
The re-check your codes and fix the error and compile again.
[Image: 3dtextven0mhf.png]
Reply
#5
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;
}
Reply
#6
IDK what seems to be the problem.When I ran it, it went good.
[Image: 3dtextven0mhf.png]
Reply
#7
(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.
Reply
#8
Great to know your problems are fixed. Dev C++ is a good IDE too.
[Image: 3dtextven0mhf.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)