-
June 24th, 2009, 06:22 AM
#1
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!
-
June 24th, 2009, 06:32 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|