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
Program is to replace every occurrence of in a string: Program is to replace every occurrence of c1 in string with c2 and have function return the no. of replacement int re

Default assignment operator mange assigning one object to another object of the same class. It is member to member copy as shallow copy.


#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 task is to convert S to palindrom

overloadstream insertion opertator to display the data of object on the console

What is the difference among const char *myPointer and char *const myPointer?  A: Const char *myPointer is a non constant pointer to constant data; whereas char *const myPointer

.Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Described the ISA and HASA class relationships. How would you apply each in a class design? A: A specialized class "is" specialization of another class and, thus, has the ISA re

Write a function that computes f(x) for a quadratic polynomial in x, such as the one in assignment 3. Use the function to plot f(x) from -10 to +10.

#include stdio.h> #include conio.h> #include string.h>   void main() {           char a[50],b[25][25],l[25],temp1;           int i=0,j=0,k=0,l1[25],c=0,c1=0,t=