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 for calculate average of total marks: #include using namespace std; void print(int marks_arr[],int cnt) { int ind[cnt]; int i=0; int j=0; int k=0;

A: Use p = new T[n] and delete[] p:   Fred* p = new Fred[100]; ... delete[] p; Any time you allocate an array of objects through new (generally with the [n] in the n

A: Along with the C++ language, you can overload operators and functions. Overloading is the practice of supplying more than one definition for a provided function name in the same

Define Commonly Used Built-in Library Functions? Comprise opened a file pointer you will desire to use it for either input or output. The C language supplies a set of functions

Write a C program to compute the factorial of  5 i.e 1x2x3x4x5 etc #include stdio.h   void main()   {   char promt;      int factor;   factor = 1*2*3*4*5;   printf("The fac

I Want a answer for solving the big M method in the topic of simplex method...

Differences between a pointer and a reference 1.  A reference must always point to some object where as this restriction is not imposed on a pointer. e.g. int *pi = 0;

Converting Base Type to Class Type (char to string)   class String { char *name; int length; public: String(void) {length =0; name = new char[length+1];

Write a program to find minimum number of shelves

program area under the curve y=f(x) between x=a & y=b, integrate y=f(x) between the limits of a & b   Solution: #include float    start_point,            /* GLOBAL V