Monday 19 September 2016

Friends


  • Friends :There are certain special cases where a class would want access to other classes private attributes and methods in such scenario we can make use of the friends concept in classes.
  • The Syntax “Definition deferred “means that you can refer to objects in your program which haven't yet been defined but will be later on in your code.
  • For Example : If a class A declares itself as a friend to class B then class B will have access to all the private and protected attributes and methods of class A. 
                          more information........



No comments:

Post a Comment