May 4, 2002 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 how to use member function from another class?
May 4, 2002 #2 williamu Programmer Joined Apr 8, 2002 Messages 494 Location GB 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 Upvote 0 Downvote
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