Вам нужен префикс Appointment:::
Appointment::
bool Appointment::occurs_on(int month, int day, int year)
, иначе вы определяете свободную функцию.