What is virtual class and friend class, C/C++ Programming

Friend classes are used when two or more classes are designed to work together and require access to each other's execution in ways that the rest of the world shouldn't be permitted to have. In other words, they help keep private things private. For instance, it may be desirable for class DatabaseCursor to have more privilege to the internals of class Database than main() has.               

 

 

Posted Date: 4/8/2013 5:43:39 AM | Location : United States







Related Discussions:- What is virtual class and friend class, Assignment Help, Ask Question on What is virtual class and friend class, Get Answer, Expert's Help, What is virtual class and friend class Discussions

Write discussion on What is virtual class and friend class
Your posts are moderated
Related Questions
F u nction Returning Object: This program is like to the previous program except the function returns object.  The main rule to be remembered is the function returning obj

Bubble sort C program: Write a program to define a bubble sort. void main()  {   clrscr();   int a[100],ch,n;   cout   cin>>n;   for (int i=0;i

A: Use operator overloading to present a friend left-shift operator, operator #include class Fred { public: friend std::ostream& operator ... private: int i_; // onl

Networking program development. 1.ARP protocol. 2.Switching HUB. 3.wireshark. 4.winpcap library. 5.C++ & MFC. 6.LAN evironment through switch and HUB(static ARP t

Program is to create a file student.dat: Program is to create a file student.dat which contains all name, roll_no,marks(5 sub) and percentage   class student    {

Problem : Change to palindrome A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your ta

Inheritance and Reuse Consider a car manufacturing company. When they require building a new car, they have two choices. They can start from the scratch, or they can change an

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and

Structure of C++ Program: Chronological order of C++ program. 1.   Class declaration 2.   Main function program 3.   Member functions definitions 4.   Include heade