Friend Class and Polymorphism in C++

Sometimes we want to use the private members of class outside. For this, we need to use the keyword friend, which help us to create a function as friend function and helps us to create a class as friend class.

Friend Class:

Sometimes we want to use the private members of class outside. For this, we need to use the keyword friend, which help us to create a function as friend function and helps us to create a class as friend class. When we declare any function or any class as friend that means we can use the private members of class outside by the non-members of class.

Polymorphism:

Polymorphism is very important feature of object-oriented programming. The name polymorphism has taken from the Latin language as polymorphous. It means one name multiple forms. In this concept we can have number of different concept like function overloading, operator overloading, constructor overloading, early binding or static linkage or static binding or compile time polymorphism, dynamic binding or late binding, run time polymorphism or dynamic linkage.

Classification of Polymorphism:

  1. Compile Time Polymorphism
  2. Run Time Polymorphism

Compile Time Polymorphism:

21 Responses

09.08.16

Serious article.

Good article!

09.08.16

Out of my depth but very interesting :)

09.08.16

Very interesting! Like it!

Did not understand it too much, but very informative..It will help someone out there I am sure

09.08.16

Like Geoge firth Put it out of my depth but it is interesting what programmers deal with

09.08.16

good article

09.08.16

Once again I am lost.

09.08.16

I am so lost but I’m sure it will be very helpful for some.

09.08.16

You really are a genius on this topic

09.08.16

nice article

09.08.16

i have to go back to my programming lessons to analyze ur topic …but thanks..

09.08.16

very helpful… thank you

09.08.16

Looks good but wish I understand this better.

09.08.16

Interesting.

09.08.16

Very nice

Amandeep
09.08.16

I think that you are master in C++. I read your some programming articles. All articles are easy and interesting to understand. Keep on publishing more and more.

09.08.16

looks like you’re a C++ genius…

Mike
09.08.16

Thanks for the information..very useful

09.08.16

Definitely useful!

09.08.16

Good Work

Interesting

Best Regards

Leave Your Response