I have just started learning C++ and the book I am using wanted me to create a simple program:
When I created a 'class' called "print1.cpp" in Eclipse, it created all this generic code, along with a separate file called print1.h
print1.cpp had the following:
print1.h had:
I don't understand what's going on at all. I am experienced in JAVA and trying to learn C++ but what does this all mean? When I put my peice of code at the end of the print1.cpp file, there is a warning that comes up stating <iostream> is an unresolved inclusion.
<Please be verbose
>
Thanks in advance guys!
P.s. Is there another compiler that you guys would recommend that would be easier to learn on?
Code:
#include <iostream.h>
using namespace std;
int main() {
cout << "Never fear, C++ is here!";
return 0;
}
When I created a 'class' called "print1.cpp" in Eclipse, it created all this generic code, along with a separate file called print1.h
print1.cpp had the following:
Code:
/*
* print1.cpp
*
* Created on: Jul 6, 2009
* Author: Administrator
*/
#include "print1.h"
print1::print1() {
// TODO Auto-generated constructor stub
}
print1::~print1() {
// TODO Auto-generated destructor stub
}
print1.h had:
Code:
#ifndef PRINT1_H_
#define PRINT1_H_
class print1 {
public:
print1();
virtual ~print1();
};
#endif /* PRINT1_H_ */
I don't understand what's going on at all. I am experienced in JAVA and trying to learn C++ but what does this all mean? When I put my peice of code at the end of the print1.cpp file, there is a warning that comes up stating <iostream> is an unresolved inclusion.
<Please be verbose

Thanks in advance guys!
P.s. Is there another compiler that you guys would recommend that would be easier to learn on?