Defining Operator overloading

An operator could be overloaded with the help of a special function called operator function, the general form of an operator function is: ...
Read More →

What is Operator overloading ?

Operator overloading is one of the exciting features of C++.  All the built-in operator can be applied to basic data types (int, float, cha...
Read More →

What is Friend Class?

With the possibility of friend function, we can also define a class as a friend of the another one, granting the second class to access the...
Read More →

Write a program using friend function

Class sample {            private: int a, b;           public:void setvalue()          {                     a=20; b=40;            } ...
Read More →

What is Friend Function?

Private member function can’t be accessed from outside the class. That is a non-member function can’t access the private data of the class....
Read More →

Objects as function arguments

Like any other data type, an object may be passed as a function argument. It can be done in two ways a copy of an entire object is passed ...
Read More →

What are Destructors?

A destructor as the name implies used to destroy the objects that have been created by constructor. Like a constructor , the destructor is ...
Read More →

What is Copy Constructors?

A copy constructor is used to declare and initialize an object from another object. class integer {          private : int m;          pub...
Read More →

What is Const Object?

Making variables const ensures that their values are not accidentally changed. Just like the built-in data types (int, double, char, etc…...
Read More →