Virtual Base Class
Virtual base class : When two derived classes access only the single copy of the base class, then the base class is known as a virtual base class. When a multiply , multilevel and hierarchical inheritance are combined in a program then the need of virtual base class occurs. In the above diagram class D has two direct base classes B & C and origin these base classes B and C have a common base class A. The derived class D inherits the features of base class A by two derived classes B and C . Hence there is a problem occurs , the derived class D inherits the features of base class two times by B and By C . i.e...
Saturday, 19 April 2014
Wednesday, 16 April 2014
0 Array in c++
Array in c++
Array
An array is a group of data items of same type that share a common name . Normally ordinary variable stores one value at a time . If we want to store more than one value at a time in a single variable , then we use arrays . Also we can say that an array is an ordered set of data items of similar type . All the element of array are stored in the memory in consecutive form . Since the array uses subscripts , therefore it is also known as subscripts variable .
An array variable can be declared as :-
Syntax : data _ type variable _name [size] ;
...
Subscribe to:
Posts (Atom)