Thank you!!
I changed the main call to
Code:
isLarger(firstDate, secondDate);
yet continued to receive an error message for unresolved externals. So I placed the call directly in my header file as well as the definition file and it does compile and run correctly now. I'll show - in my header file:
Code:
bool isLarger(CDate firstDate, CDate secondDate);
and in my definition file:
Code:
bool isLarger(CDate firstDate, CDate secondDate)
{
if (firstDate.convert() > secondDate.convert())
{
cout << "The first date entered is the most recent. " << endl << endl;
return true;
}
else
{
cout << "The second date entered is the most recent. " << endl << endl;
return false;
}
}
and in my main() function
Code:
isLarger(firstDate, secondDate);
Earlier in this conversation, Laserlight mentioned passing by constant reference. What did you mean by that? How do I make this more efficient?