User Tools

Site Tools


cpp:stl:intro

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
cpp:stl:intro [2023/05/29 16:15] – [Η κλάση Student] gthanoscpp:stl:intro [2023/05/30 11:02] – [Η κλάση Student] gthanos
Line 26: Line 26:
   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 73: Line 74:
 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/stl/intro.txt · Last modified: 2023/05/30 18:30 by gthanos