By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,750 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,750 IT Pros & Developers. It's quick & easy.

What are friend classes?

P: n/a
Hi.
I'm just wondering what friend classes/functions are.
It's because I stumbled across them while analyzing a source.

Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Snyke wrote:
I'm just wondering what friend classes/functions are.
It's because I stumbled across them while analyzing a source.


If a function declared a friend you may access private members of
the class inside the body of that function. Declaring a whole class
a friend grants access to private members inside the scope of that
class.

Victor
Jul 22 '05 #2

P: n/a
On 5 Aug 2004 08:04:21 -0700, "Snyke" <sn***@counterstrike.de> wrote:
Hi.
I'm just wondering what friend classes/functions are.
It's because I stumbled across them while analyzing a source.


Read the FAQ for a quick introduction to friends:
http://www.parashift.com/c++-faq-lite/

rossum
--

The ultimate truth is that there is no Ultimate Truth
Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.