TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: HERBERT BUSHONG
from: CHRIS DOWNS
date: 1997-08-20 20:06:00
subject: Re: friends not friends :

 HB> My understanding was that "friend class ..." made ALL members
 HB> irregardless of protection "accessible" to the friend class. I've had
 HB> this problem before, and the only solution was to make the necessary
 HB> members public; but I don't really  want them public.
 HB> friend functions work perfectly, but trying to make a whole class a
 HB> friend  doesn't. :(
 HB> Any solutions? (besides deriving the *Str classes from LapTimer, I've 
 HB> considered it but it adds some additional headaches I'd rather not
 HB> deal with  at present)
 The code you provided compiles just fine on VC++ (changing the 
 Timer_t class designation to something that's defined).  And yes,
 your friend classes ought to be able to access private and 
 protected members of the class for which it is a friend.
 It seems like you're up the creek sans the proverbial paddle...
---
 þ Blue Wave/QWK v2.12 þ
---------------
* Origin: St. Louis Users Group (1:100/4)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.