|
-
April 25th, 2011, 03:36 PM
#20
Re: A question regarding singleton
I think (I can't seem to find a good reference online) that functions that are friends cannot be member functions of another class. Therefore, if the compiler sees a friend function enclosed in a class definition, it can assume that the function is indeed free, so there is no error.
Classes can be friends of other classes, which would allow the member functions of one class access to data members of the other.
Viggy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|