This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
|
cpp:stl:intro [2023/05/29 16:14] gthanos |
cpp:stl:intro [2023/05/30 11:02] gthanos [Η κλάση Student] |
||
|---|---|---|---|
| Line 7: | Line 7: | ||
| ===== Η κλάση Student ===== | ===== Η κλάση Student ===== | ||
| - | Στα παραδείγματα που ακολουθούν συχνά χρησιμοποιείται η παρακάτω κλάση Student. | + | Στα παραδείγματα που ακολουθούν |
| <code cpp Student.hpp> | <code cpp Student.hpp> | ||
| Line 26: | Line 26: | ||
| friend std:: | friend std:: | ||
| bool operator> | bool operator> | ||
| + | bool operator< | ||
| Student& | Student& | ||
| }; | }; | ||
| Line 73: | Line 74: | ||
| bool Student:: | bool Student:: | ||
| if(aem > st.aem) | if(aem > st.aem) | ||
| + | return true; | ||
| + | return false; | ||
| + | } | ||
| + | |||
| + | bool Student:: | ||
| + | if(aem < st.aem) | ||
| return true; | return true; | ||
| return false; | return false; | ||