I'm beginning my c++ programming.
So I'm kinda of a newbie. I learned java if that helps.
I'm a beginner so please help me as I'm really new to programming c++. Basically, I don't know anything. So I hope someone can help me here.
I looked for a compiler for c++ and tried both eclipse and XCode. I don't know how to use any of them
I used eclipse for java programming in class and this was easy to use. So thinking that, I installed both XCode and eclipse to give them both a try.
Tried XCode but that seemed unfamiliar and I Started off as New-> Project and when I selected, C++ Carbon, it included bunch of Mac specific files.
So I tried eclipse. Whenever I create a new project, it creates two classes for one class I create. For example, I created HelloWorld class and it created two classes for me: "HelloWorld.cpp" and "HelloWorld.h" What am I supposed to do with those?
I typed this code in the cpp class and then ran it and it gave me an error saying no binary found. What does that mean? THis is the code:
And in Eclipse, when I created the class, in the cpp class this code was already inserted by eclipse :
And this was included in the HelloWorld.h file it already created for me:
If someone can help me how to compile in either eclipse or XCode, I will be very grateful. Remember, I'm just starting out.
So I'm kinda of a newbie. I learned java if that helps.
I'm a beginner so please help me as I'm really new to programming c++. Basically, I don't know anything. So I hope someone can help me here.
I looked for a compiler for c++ and tried both eclipse and XCode. I don't know how to use any of them
I used eclipse for java programming in class and this was easy to use. So thinking that, I installed both XCode and eclipse to give them both a try.
Tried XCode but that seemed unfamiliar and I Started off as New-> Project and when I selected, C++ Carbon, it included bunch of Mac specific files.
So I tried eclipse. Whenever I create a new project, it creates two classes for one class I create. For example, I created HelloWorld class and it created two classes for me: "HelloWorld.cpp" and "HelloWorld.h" What am I supposed to do with those?
I typed this code in the cpp class and then ran it and it gave me an error saying no binary found. What does that mean? THis is the code:
Code:
#include "Code.h"
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!\n";
cin.get();
}
And in Eclipse, when I created the class, in the cpp class this code was already inserted by eclipse :
Code:
#include "HelloWorld.h"
HelloWorld:: HelloWorld() {
// TODO Auto-generated constructor stub
}
HelloWorld::~ HelloWorld() {
// TODO Auto-generated destructor stub
}
And this was included in the HelloWorld.h file it already created for me:
Code:
#ifndef HELLOWORLD_H_
#define HELLOWORLD_H_
class HelloWorld {
public:
HelloWorld();
virtual ~HelloWorld();
};
#endif /* HELLOWORLD_H_ */
If someone can help me how to compile in either eclipse or XCode, I will be very grateful. Remember, I'm just starting out.