Friend Class

  • Thread starter Thread starter LDD
  • Start date Start date
If you want to be 'friend', wouldn't that by definition mean it can only be
used in the assembly it is in?

If you want it to be used both inside and outside the assembly, it should be
public.
 
Marina said:
If you want to be 'friend', wouldn't that by definition mean it can only be
used in the assembly it is in?

If you want it to be used both inside and outside the assembly, it should be
public.

You could do it as protected if you want it to be only accessed by
derived members of the same class... otherwise public does have to be
used to get it available outside the assembly.

Chris
 
Back
Top