Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use member function from another class?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
how to use member function from another class?
 
Inside your class:

OtherClass* pOther = new OtherClass(args) ;
pOther->UseFunction() ;


Remember to use: delete pOther ; when finished.

Or you could :

class MyClass
{
...

friend class OtherClass ;
} ;

This is will allow the OtherClass access to your Members and Functions.

HTH.

William
Software Engineer
ICQ No. 56047340
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top