cpp:copy_constructors
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
cpp:copy_constructors [2020/04/14 15:24] – gthanos | cpp:copy_constructors [2020/04/14 15:32] – [Ορισμός ενός κατασκευαστή αντιγραφέα] gthanos | ||
---|---|---|---|
Line 76: | Line 76: | ||
} | } | ||
</ | </ | ||
- | ή ο παρακάτω | + | ή ισοδύναμα |
<code cpp> | <code cpp> | ||
Rectangle:: | Rectangle:: | ||
Line 84: | Line 84: | ||
</ | </ | ||
- | Και οι δύο παραπάνω κατασκευαστές δηλώνουν ένα κατασκευαστή αντιγραφέα. Στη δεύτερη περίπτωση, | + | Και οι δύο παραπάνω κατασκευαστές |
<code cpp Rectangle.hpp> | <code cpp Rectangle.hpp> | ||
Line 111: | Line 111: | ||
} | } | ||
- | Rectangle:: | + | Rectangle:: |
cout << " | cout << " | ||
width = s; height = s; | width = s; height = s; | ||
Line 122: | Line 122: | ||
Rectangle:: | Rectangle:: | ||
- | cout << Calling copy constructor" | + | cout << |
width = r.width; | width = r.width; | ||
height = r.height; | height = r.height; |
cpp/copy_constructors.txt · Last modified: 2022/05/12 19:41 by gthanos