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
What is balance factor?
What is encapsulation c#?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is polymorphism in oop example?
What is polymorphism and example?
What do you mean by overloading?
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.
What does <> mean pseudocode?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
what's the basic's in dot net
What is polymorphism used for?
Why is polymorphism used?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
write knight tour problem which is present in datastructure
What are the 3 principles of oop?