Friend Class

  • Thread starter Thread starter LDD
  • Start date Start date
L

LDD

How do I declare a class as a friend that can be used outside the local
assembly?

LDD
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top