cpp:constructors
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
cpp:constructors [2020/04/14 07:34] – gthanos | cpp:constructors [2020/04/14 07:36] – gthanos | ||
---|---|---|---|
Line 17: | Line 17: | ||
int getHeight() const; | int getHeight() const; | ||
}; | }; | ||
+ | </ | ||
+ | |||
+ | <code cpp Rectangle.cpp> | ||
+ | #include " | ||
Rectangle:: | Rectangle:: | ||
width = w; height = h; | width = w; height = h; | ||
} | } | ||
- | |||
void Rectangle:: | void Rectangle:: | ||
void Rectangle:: | void Rectangle:: | ||
Line 40: | Line 43: | ||
<WRAP center round info 80%> | <WRAP center round info 80%> | ||
Σε αναλογία με τις μεθόδους ο κατασκευαστής μπορεί να οριστεί εντός της κλάσης, | Σε αναλογία με τις μεθόδους ο κατασκευαστής μπορεί να οριστεί εντός της κλάσης, | ||
- | < | + | < |
class Rectangle { | class Rectangle { | ||
private: | private: |
cpp/constructors.txt · Last modified: 2021/05/07 06:11 (external edit)