cpp:stl:intro
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| cpp:stl:intro [2023/05/30 11:02] – [Η κλάση Student] gthanos | cpp:stl:intro [2023/05/30 18:30] (current) – [Η κλάση Student] gthanos | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| class Student { | class Student { | ||
| - | public: | + | private: |
| char *name; | char *name; | ||
| int aem; | int aem; | ||
| + | public: | ||
| Student(); | Student(); | ||
| Student(const char *name, int aem); | Student(const char *name, int aem); | ||
| Student(const Student& | Student(const Student& | ||
| ~Student(); | ~Student(); | ||
| + | | ||
| + | char* getName() const; | ||
| + | int getAEM() const; | ||
| + | void setName(char*); | ||
| + | void setAEM(int); | ||
| + | | ||
| friend std:: | friend std:: | ||
| bool operator> | bool operator> | ||
| Line 54: | Line 60: | ||
| delete []name; | delete []name; | ||
| } | } | ||
| + | } | ||
| + | |||
| + | char* Student:: | ||
| + | return name; | ||
| + | } | ||
| + | |||
| + | int Student:: | ||
| + | return aem; | ||
| + | } | ||
| + | |||
| + | void Student:: | ||
| + | this-> | ||
| + | delete this-> | ||
| + | this-> | ||
| + | strcpy(this-> | ||
| + | } | ||
| + | |||
| + | void Student:: | ||
| + | this-> | ||
| } | } | ||
cpp/stl/intro.1685444577.txt.gz · Last modified: 2023/05/30 11:02 by gthanos
