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 revisionPrevious revision
Next revision
Previous revision
cpp:templates [2019/05/14 10:24] gthanoscpp:templates [Unknown date] (current) – external edit (Unknown date) 127.0.0.1
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.1557829493.txt.gz · Last modified: 2019/05/14 09:24 (external edit)