Pls...could any one tell me that whether we can access the
public data memeber of a class from another class with in
the same program.
Awaiting for your response Thanku

Answer Posted / pramod

If it's about the data accessing, whether public or private
... you can use friend function.This friend function can be
member of 2nd class and friend for the 1st class.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an interface in oop?

595


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1788


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1395


What polymorphism means?

622


Explain the advantages of inheritance.

675






Which language is pure oop?

551


What is the point of oop?

656


What is object in oop?

679


What do you mean by abstraction?

613


What are the components of marker interface?

602


There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.

1458


How to improve object oriented design skills?

569


What is the real time example of inheritance?

641


What is purpose of inheritance?

645


What is the advantage of oop over procedural language?

628