4.10 Overloading Binary Operator in C++

Опубликовано: 03 Май 2018
на канале: Darshan University
4,510
35

Operator overloading concept, Overloading binary operator +, operator overloading using a friend function.

Specifying more than one definition for an operator in the same scope is called operator overloading.
You can overload operators by creating “operator functions”.
Operator overloading extends the overloading concept to operators, letting you assign multiple meanings to C++ operators.
Operator overloading giving the normal C++ operators such as +, * and == additional meanings when they are applied with user-defined data types.
Some of C++ Operators are already overloaded.
Operator overloading is compile time polymorphism.
The only existing operator can be overloaded.
The overloaded operator must have at least one operand that is a user-defined type.
We cannot change the basic meaning and syntax of an operator.


GTU - Computer Engineering (CE) - Semester 4 - 2140703 - Object Oriented Programming with C++ - Concepts of C++ - Introduction to Object Oriented Programming

Object-Oriented Programming with C++ PPTs are available here: http://www.darshan.ac.in/DIET/CE/GTU-...

This video is recorded by Prof. Rupesh Vaishnav ([email protected], +91-9428037452) at Computer Engineering Department of Darshan Institute of Engineering & Technology, Rajkot as per GTU Syllabus.

Darshan Institute of Engineering & Technology, Rajkot is a leading institute offering undergraduate, graduate and postgraduate programs in engineering. The Institute is affiliated to the Gujarat Technological University (GTU) and approved by the AICTE, New Delhi.

Visit us: http://www.darshan.ac.in
Write us: [email protected]
Facebook:   / darshaninstitute.official  
Twitter:   / darshan_inst  
Instagram:   / darshan_inst