Operator Overloading (FlashDrive 2.0)
In C++, many of the keyboard symbols that are used between twovariables can be given a new meaning. This feature is calledoperator overloading and it is one of the most popular C++features. Any class can choose to provide a new meaning to akeyboard symbol. Not every keyboard letter is re-definable in thisway, but many of the ones we have encountered so far are like +, -,*, /, >and
But because so many of us have an assumption that +should doaddition but also perform string concatenation when working withtextual data. Each operator becomes a friendfunction in C++ thatyour class
OR
OR