• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » C++ » Classes » What is Overloading. Type of Overloading
Next →
← Prev

What is Overloading. Type of Overloading

By Dinesh Thakur

Overloading: When a single Object has multiple behaviors. Then it is called as Overloading. Overloading is that in which a Single Object has a same name and Provides Many Functions. In Overloading followings things denotes Overloading:-

1)      When an Object has Same Name.
2)      Difference is Return type.
3)      Difference in Function, with Multiple Arguments.
4)      Difference in Data Type.

1)   Constructor Overloading: Constructor overloading is that in which a Constructor has a same name and has multiple Functions, then it is called as Constructor Overloading. As we Know that Constructor are of Default, Parameterized and Copy Constructors. So that when we are creating a Single Constructor with Multiple Arguments then it is called as Constructor Overloading.
2)   Operator Overloading: As we know that Operators are used for Performing Operations on the Operands. But Each and Every Operator has Some Limitations Means an Operator which is also called as Binary are used for Performing Operations on the two Operands and Unary Operators performs their Operation on the single Operand.
So with the help of Operator Overloading, we can Change the Operation of the Operator. Means With the help of Operators we can Change the Operation of the Operators. For Example with the help of Binary Operators we can add two Objects Means not only the two Data Members of the Class, This will add all the Data Members of the Class.
So Like this Way we can Also Change the Behavior of the Unary Operator Means Unary Operators are used for Performing the Operation on the Single Operand. But With the help of Operator Overloading we can Change the behavior of the unary Operator means we can perform Operations means we can Increase or Decrease the values of two or more Operands at a Time.
And With the Help of Comparison Operators we can also compare the Two Objects Means all the Data Members of one Object can be compared with the Data Members of the Other Object. Without the help of Operator Overloading this is not possible to compare two Objects. So with the help of Comparison Operators we can compare two Objects.
3) Method Overloading: – Method Overloading is also called as Function Overloading. Overloading Means a Functions  has many Behaviors occurred When in class when a functions has same name but different behaviors A Functions said to be overloaded When :-

Ø    Function has same Name but Different Return Type
Ø    Difference in No of Arguments
Ø    Different Return Type in Arguments

When We Pass a Call for Execution then it will match the Criteria of Function like Number of Arguments and Data types etc.

Overloading: When a single Object has multiple behaviors. Then it is called as Overloading. Overloading is that in which a Single Object has a same name and Provides Many Functions. In Overloading followings things denotes Overloading:-

1)      When an Object has Same Name.

2)      Difference is Return type.

3)      Difference in Function, with Multiple Arguments.

4)      Difference in Data Type.

1)   Constructor Overloading: Constructor overloading is that in which a Constructor has a same name and has multiple Functions, then it is called as Constructor Overloading. As we Know that Constructor are of Default, Parameterized and Copy Constructors. So that when we are creating a Single Constructor with Multiple Arguments then it is called as Constructor Overloading.

2)   Operator Overloading: As we know that Operators are used for Performing Operations on the Operands. But Each and Every Operator has Some Limitations Means an Operator which is also called as Binary are used for Performing Operations on the two Operands and Unary Operators performs their Operation on the single Operand.

So with the help of Operator Overloading, we can Change the Operation of the Operator. Means With the help of Operators we can Change the Operation of the Operators. For Example with the help of Binary Operators we can add two Objects Means not only the two Data Members of the Class, This will add all the Data Members of the Class.

So Like this Way we can Also Change the Behavior of the Unary Operator Means Unary Operators are used for Performing the Operation on the Single Operand. But With the help of Operator Overloading we can Change the behavior of the unary Operator means we can perform Operations means we can Increase or Decrease the values of two or more Operands at a Time.

And With the Help of Comparison Operators we can also compare the Two Objects Means all the Data Members of one Object can be compared with the Data Members of the Other Object. Without the help of Operator Overloading this is not possible to compare two Objects. So with the help of Comparison Operators we can compare two Objects.

3) Method Overloading: – Method Overloading is also called as Function Overloading. Overloading Means a Functions  has many Behaviors occurred When in class when a functions has same name but different behaviors A Functions said to be overloaded When :-

Ø    Function has same Name but Different Return Type

Ø    Difference in No of Arguments

Ø    Different Return Type in Arguments

When We Pass a Call for Execution then it will match the Criteria of Function like Number of Arguments and Data types etc.

You’ll also like:

  1. Function Overloading and Method Overloading in Java
  2. What is Function Overloading and Operator Overloading
  3. Write a C++ program for Overloading ->
  4. C++ Program Illustrates The Overloading Of Unary Minus (-) Operator
  5. Write A C++ Program For Addition & Multiplication Of Two Matrices By Overloading + And * Operators.
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

C++ Tutorials

C++ Tutorials

  • C++ - Data Types
  • C++ - Operators Types
  • C++ - CPP Program Structure
  • C++ - Conditional Statements
  • C++ - Loop
  • C++ - do-While Loop
  • C++ - Control Statements
  • C++ - Tokens
  • C++ - Jump Statements
  • C++ - Expressions
  • C++ - Constants
  • C++ - Character Set
  • C++ - Iteration Statements
  • C++ - I/O Statements
  • C++ - String
  • C++ - Manipulators

C++ Operator

  • C++ - Input/Output Operator
  • C++ - Operator Overloading

C++ Functions

  • C++ - Functions
  • C++ - Member Functions
  • C++ - Returning Object from Function
  • C++ - Call by Value Vs Reference
  • C++ - Friend Function
  • C++ - Virtual Function
  • C++ - Inline Function
  • C++ - Static Data Members
  • C++ - Static Member Functions

C++ Array & Pointer

  • C++ - Array
  • C++ - Array of Objects
  • C++ - Arrays as Class Members
  • C++ - Vector
  • C++ - Pointer
  • C++ - 'this' Pointer

C++ Classes & Objects

  • C++ - Class
  • C++ - Program Structure With Classes
  • C++ - OOP’s
  • C++ - Objects as Function Arguments
  • C++ - Procedure Vs OOL
  • C++ - Object Vs Class
  • C++ - Creating Objects
  • C++ - Constructors
  • C++ - Copy Constructor
  • C++ - Constructor Overloading
  • C++ - Destructor
  • C++ - Polymorphism
  • C++ - Virtual Base Class
  • C++ - Encapsulation

C++ Inheritance

  • C++ - Inheritance
  • C++ - Multiple Inheritance
  • C++ - Hybrid Inheritance
  • C++ - Abstraction
  • C++ - Overloading

C++ Exception Handling

  • C++ - Exception Handling
  • C++ - Templates
  • C++ - Standard Template Library

C++ Data Structure

  • C++ - Link List

C++ Programs

  • C++ Program for Electricity Bill
  • C++ Program for Multiply Matrices
  • C++ Program for Arithmetic Operators
  • C++ Program For Matrices
  • C++ Program for Constructor
  • C++ Program Verify Number
  • C++ Program Array Of Structure
  • C++ Program to find Average Marks
  • C++ Program Add And Subtract Matrices
  • C++ Program Menu Driven
  • C++ Program To Simple Interest
  • C++ Program To Find Average
  • C++ program exit()
  • C++ Program Using Array Of Objects
  • C++ Program Private Member Function
  • C++ Program To Reverse A String
  • C++ Program to Operator Overloading

Other Links

  • C++ - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW