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
recsection method source code for searching position


Run the following C++ program with and without preprocessor variable POSTFIX defined. #include using namespace std; extern "C" int atoi( const char *str );

What is the use of PEAR in php? PEAR is termed as PHP Extension and Application Repository. It provides structured library to PHP users and also gives provision for package mai

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst. Shortest remaining time rst algori

The Shift Operators There are 2 shift operators : left shift ( >). These are binary operators. The format is                 operand >> number or operand   The first

array of class objects and single inheritance

superposition of waves

Write a simple telephone book program that stores the names and phone numbers of your friends/acquaintances in a file. Your program should have the abilities to: a. Add entries (n

program for lexicographically precedes the given input permutation