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 / saurabh

You can access by just creating the object of first class
and then using this object to access public member in
second class.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is class defined?

586


Templates mean

1587


Get me an image implementation program.

1557


What is abstraction in oop?

631


How does polymorphism work?

635






What is a null tree?

632


Whats is abstraction in oops?

591


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

629


write a program that takes input in digits and display the result in words from 1 to 1000

1988


Will I be able to get a picture in D drive to the c++ program? If so, help me out?

1657


why reinterpret cast is considered dangerous?

1901


What is the real time example of inheritance?

639


Write a c++ program to display pass and fail for three student using static member function

2814


Which method cannot be overridden?

578


What is stream in oop?

838