Syntax Failures in Eclipse

I'm trying to find a useful IDE and have landed on Eclipse because it is required for use in my current Java class. I cannot seem to get anything to successfully compile after editing it in Eclipse. The following Hello World compiles perfectly in command prompt:

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <cstdlib>
#include <iostream>

using namespace std;

int main() {

	string a="Hello World!";

	cout << a;

	return 0;
}


But like all other projects I've written in Eclipse, when I "Run As" it says it "cannot find the Binary"

Does this have to do with the template it generates when I create a project? Why is my code unacceptable only in the context of Eclipse? Any opinions on Eclipse versus other IDE's?
Since I'm brand new to these forums and no one has responded I'm assuming something was wrong with the format of the question. How can I rephrase it so it looks worth answering?
closed account (LN7oGNh0)
Why dont you use microsoft visual c++ 2010? I think its really good. Sorry, I dont know how to fix your problem, but all i can say is switch to a new IDE.
Since I'm brand new to these forums and no one has responded I'm assuming something was wrong with the format of the question. How can I rephrase it so it looks worth answering?


It's almost certainly a tool chain issue (i.e. not a C++ issue.) Posting in a forum where Eclipse is discussed may be more productive for you. As to why nobody answered the "Eclipse versus other IDE's" question -- it's been discussed ad nauseum here and elsewhere. Stick "IDE" in the box that's labeled Search at the top of the page and press the go button.
closed account (N36fSL3A)
FYI: I think you shouldn't declare the whole namespace std in your code, only some objects of it:

1
2
3
4
5
using std::cout;
using std::cin;
using std::endl;

//ETC. 


See what I mean?
Topic archived. No new replies allowed.