Hi folks,
Im new to C++ and currently developing C++ under os x.
Im a little bit confused the difference between .h and .cpp. What is actually a
.h file? What is the difference between .h and .cpp? I actually implement all
my methods at .h file so my .h file look like this:
#include <iostream>
using namespace std;
class Person
{
public:
Person::Person(string input)
{
userName = input;
}
void Person::setFirstName(string input)
{
firstName = input;
}
private:
string userName;
};
Is there any convention/trade off with this method?
Thank you
Regards
Jos Timanta Tarigan