(OOP) Detailed explination needed!
So I have this code which has basic Object Oriented Programming features within C++, and I understand how it works except for this part: Employee youngest (Employee *e, int n) { Employee min = e[0]; for (int i = 1; i < n; i++) { if (e[i].get_dateOfBirth().compare(min.get_dateOfBirth()) == 1) min = e[i]; } return min; } I don't understand how the if statement works here and how the "." things work. if anyone can explain and/or has similar exercises for me to try out, please feel free. This is the function within the class Date int compare(const Date date) { if (year > date.year) return 1; else if (year < date.year) return -1; else if (month > date.month) return 1; else if (month < date.month) return -1; else if (day > date.day) return 1; else if (day < date.day) return -1; else return 0; } I can't take a picture, and I'm new at this app, so if anyone can DM me, any help is appreciated really.