CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    17

    Communication between two classes

    Hi!
    I need to khow all the ways possible to communicatie between tow classes.
    I need a way to call a function of a class from a function of another class.
    Many thanks!

  2. #2
    Join Date
    Jun 2009
    Posts
    14

    Re: Communication between two classes

    Could you be a bit more specific? What do you mean with communication?

    If you have two classes A and B you can call a method of A from a method of B if either an Object of class A is a member of B or there is an Object of class A inside the method of B:

    Code:
    B::SomeMethodOfB()
    {
         A objA;
         objA.SomeMethodOfA();
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured