cpp:friend_methods
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
cpp:friend_methods [2017/04/20 15:17] – created gthanos | cpp:friend_methods [2017/04/20 15:23] – gthanos | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Φιλικές Συναρτήσεις ====== | ====== Φιλικές Συναρτήσεις ====== | ||
- | Μία φιλική συνάρτηση της κλάσης είναι μία συνάρτηση που δεν είναι μέλος της κλάσης, | + | Μία φιλική συνάρτηση της κλάσης είναι μία συνάρτηση που δεν είναι μέλος της κλάσης, |
<code cpp Rectangle.cpp> | <code cpp Rectangle.cpp> | ||
Line 16: | Line 16: | ||
int getWidth(); | int getWidth(); | ||
int getHeight(); | int getHeight(); | ||
- | friend void modifyDimensions(int dw, int dh); | + | friend void modifyDimensions(Rectangle r, int dw, int dh); |
}; | }; | ||
Line 44: | Line 44: | ||
return 0; | return 0; | ||
} | } | ||
+ | </ |
cpp/friend_methods.txt · Last modified: 2021/05/18 06:21 (external edit)