I get this error
myDate.cpp:(.text+0x160): undefined reference to `myTime::operator==(myTime const&) const'
It is my first time coding with header files and overloading operators so any help would be greatly appreciated. This is my code for myDate: http://pastebin.com/i4CLvWBS the Header: http://pastebin.com/ULircg5q
Where the errors are coming from theTime==date.getTime());
And here is an example of my overloaded operator
bool myDate::operator==(const myDate &date) const
{
return (year == date.getYear() &&
month==date.getMonth() &&
day==date.getDay() &&
theTime==date.getTime());
}
the time is from a different file called myTime and I have no clue how to properly define the operator and just in case you would new myTime to help me solve this problem : vWr5zwDq just follow that up in pastebin
I also made sure that myTime.cpp was linked properly because myTime.cpp is linked to myTime.h which is linked to myDate.h and myDate.h is linked to myTime.cpp and when I remover #include "myTime.h"
from my myDate.h my code broke for that file.
#include "myTime.h" #include "myTime.h" #include "myDate.h"
myTime::myTime() class myDate() myDate::myDate()