Quantcast
Channel: C++ friend functions/class uses? - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Charlie Martin for C++ friend functions/class uses?

$
0
0

"In C++, only your friends can access your private parts."

The point of a friend is that you can package your software into smaller groupings, like friend classes etc, while still allowing access to the internals of a class. This arguably lets you maintain finer control on encapsulation than without friending.


Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>