User Tools

Site Tools


cpp:templates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cpp:templates [2019/05/14 10:24]
gthanos
cpp:templates [2020/05/30 18:45]
gthanos
Line 29: Line 29:
   friend std::ostream& operator<<(std::ostream& out, const Student & st);   friend std::ostream& operator<<(std::ostream& out, const Student & st);
   bool operator>(const Student& st) const;   bool operator>(const Student& st) const;
 +  bool operator<(const Student& st) const;
   Student& operator=(const Student& st);   Student& operator=(const Student& st);
 }; };
Line 96: Line 97:
 bool Student::operator>(const Student& st) const { bool Student::operator>(const Student& st) const {
   if(aem > st.aem)   if(aem > st.aem)
 +    return true;
 +  return false;
 +}
 +
 +bool Student::operator<(const Student& st) const {
 +  if(aem < st.aem)
     return true;     return true;
   return false;   return false;
cpp/templates.txt · Last modified: 2020/05/30 17:45 (external edit)