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)
|