Relational Operator Overloading in C++ with Examples
Relational operators are used to compare two values and determine their relationship. In C++, the relational operators include == , != , < , > , <= , and >= . By default, these operators work with built-in data types such as int , float , and double . However, we can overload them to compare objects of a class. C++ में Relational Operators का उपयोग दो values की तुलना करने और उनके बीच संबंध निर्धारित करने के लिए किया जाता है। C++ में == , != , < , > , <= और >= relational operators हैं। ये operators सामान्यतः int , float और double जैसे built-in data types पर कार्य करते हैं। Operator Overloading की सहायता से हम इन्हें किसी class के objects की तुलना करने के लिए भी उपयोग कर सकते हैं। What is Relational Operator Overloading? Relational operator overloading is a feature of C++ that allows us to define how relational operators behave when they are used with objects of a user-defined class. Relational Operator Overloading C++ की एक सुविधा है, जिसकी सहायता से हम यह नि...