* Returning reference of a private variable of a class through public
function gives the power to the accessor to change the value of that. (Voilation
of Data abstraction :- But people want to violate the rules always).
p.s. Hence never return a reference of a pvt variable of a class.
* Definition for Pure Virtual function is allowed and it can be called (hint: via the derived class instance using scope operator as there can be no instance of class with pure virtual function). It holds good for Destructor also.
* Multiple Inherited class from the same grand parent will maintain as many copies as required. So accessing its grand parent's member should be resolved by scope operator of its parent(s). If you want to maintain only a single copy of grand parent the parent classes must be virtually derived from the grand parent (Ahaaa ...).
* Static functions can access & manipulate only static variables of that class. However if you pass an instance(object) of that class through that you can do accessing and manipulation of its non-static variables.
* Static functions can be accessed through class name followed by scope operator like any ordinary global function. No instantiation of class is necessary for this.
* Initialize the static variables of any class globally.
* Exception raised in the program only can be handled.
* "catch" should follow "try",otherwise you'll miss it. (Error!)
* catch all type of exception you are throwing. Else abort.
This page is what i thought will be useful & try to update it whenever i think (or learn) something useful.
This page hosted by
Get your own Free Home Page