Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How C++ objects Communicate to each other

Posted on 2006-06-18
6
Medium Priority
?
527 Views
Last Modified: 2012-06-27
Hi experts!

In many of the books i have read describe that " C++ objects communicate each other",and this concept is the one which confuses me most.

Can anybody explain me How this communication between objects is done with "theoriotical" and "code example"
or else give me link which expalins me about this concept


Thanks in advance
-Shanti
 


 
0
Comment
Question by:shanti_priya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 
LVL 12

Expert Comment

by:rajeev_devin
ID: 16932070
Theoratically Objects communicate with each other by passing message.
0
 
LVL 12

Expert Comment

by:rajeev_devin
ID: 16932071
Pratically they communicate with each other by calling member functions.
0
 
LVL 12

Accepted Solution

by:
rajeev_devin earned 500 total points
ID: 16932085
Example:

class Door
{
public:
   open(); // message to open the door.
};

class Car
{
   Door leftDoor; // door object, for left door
   Door rightDoor;, // door object, for right door
public:
   openLeftDoor() {    // message to open the left door of the car
      leftDoor.open(); // internally it is passing the message to the door object to open it.
   }
   openRightDoor() { // message to open the right door of the car
      rightDoor.open();
   }
}
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Expert Comment

by:grg99
ID: 16933210
C++ objects do NOT communicate with each other.  Let's settle that.  There is no built-in feature in C++ to do this.

0
 
LVL 12

Expert Comment

by:rajeev_devin
ID: 16934496
>> C++ objects do NOT communicate with each other.  Let's settle that.  There is no built-in feature in C++ to do
>> this.
Is that true ?
Then how one object uses another object ?
0
 
LVL 12

Expert Comment

by:rajeev_devin
ID: 16934504
Also I want to know in which language object communicate with each other ?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question