Link to home
Start Free TrialLog in
Avatar of indacrypt
indacrypt

asked on

Accessing a class private data members from a Form class in an MFC project

Hello,
I have a class Form2 in my MFC project which is defined as :
class Dee_Form2 : public CDialog
{
    Load ld ;
// code for class' data and functions
}

I have another class called Load in the project which has prvate data and public member functions. I need to be able to acess most of the private data members of load through form 2 . I dont want to have to write a get member function to return a data member from the Load class. Whats the workaround?  
Thanks
-D
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Have the members you need to access as public members.
Avatar of indacrypt
indacrypt

ASKER

no..that just defeats the purpose.....aah i think ill just have to write those get functions.
ASKER CERTIFIED SOLUTION
Avatar of smidgie82
smidgie82
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't think .net supports 'friend' classes.