This is quite literally driving me insane. I'm new to C++ so bear with me on this one.
Basically, I've got two files. One header file (Package.h) and the C++ file (Package.cpp)
I've got a class called Package and function prototype in the header file as follows
private:
string senderName;
public:
void setSenderName( const string & );
So when I try to define the function in the main Package.cpp file like this
void Package::setSenderName( const string &n )
{
senderName = n;
}
I get the following error: "[Error] C:\Users\Flynn\Documents\Cpp\Package.cpp:26: `Package::setSenderName(const string &)' has already been declared in `Package'"
Based on the textbook and examples I've followed this really shouldn't be happening and I don't know where I've gone wrong. Both files are in the same directory and I am using C-Free if that helps. Anyone care to help out?
Thanks in advance