Creating Overloaded operator in C++ with example

As we know The variables of primitive data types can perform a number of different operations (functions) using operators like (+, - , /, *)/ For Example: a + b * c...

Linked Lists with applications in C++

In computer science, linked lists are data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of a data and...

C++ inheritance

lets have a look at the below example: // C++ inheritance #include<iostream> using namespace std;   class Point { protected:     int x,y; public:     Point(int ,int);     void display(void); };   Point::Point(int a,int b) {     x=a;     y=b; }   void Point::display(void) {      cout<<"point = "; }   class Circle : public Point {     double radius; public:     Circle(int ,int ,double );     void display(void); };   Circle::Circle(int a,int b,double c):Point(a,b) {     radius = c; }   void Circle :: display(void) {     Point::display();     cout<<" and radius = "<<radius; }   int main(void) {     Circle c(3,4,2.5);     c.display();     cout<<endl;     return 0; } In the above we took a class “point” in which we defined its attributes (its data members and member functions), then we inherited(derived) the...

Overloading Subtraction Operator in C++

Here we have overloaded subtraction operator for a specific class or one can say subtraction operator is overloaded for a self-defined data type in C++. The code is: ...

Program for Palindrome in C++

Palindrome is a word that reads the same forward or backward. Now how can we check a string that it is a palindrome or not? We can do it by using...

Functions in C++

We need to write a function in order to simplify our main(). A function contains three terms that are its prototype, its definition and its calling or we can say invoking.these...

Calculation of Summation in C++

In Mathematics we have studied "SUMMATION". the below example provides you the C++ code to find summation of several numbers in C++. We can take the inputs from the user to...

Bank Management System Project in C++

The Given Source Code provides you A bank management system in C++. The Given management system is implemented in C++ using File Handling for Data storage. Following are the features of...

datatypes in C++

Just like other languages, all variables have a datatypes in C++  ,name, size and value. The detailed info of the datatypes of C++ is: Type Name Bytes Other Names Range of...

Performing Operator Overloading in C++ with example

As we know The variables of primitive data types can perform a number of different operations (functions) using operators like (+, - , /, *)/ For Example: a + b * c...