0
Operator overloading
I can't understand operator overloading in c++.can anyone explain or give me some resources to learn??
11 Respostas
+ 7
This is where I got my syntax from:
https://en.cppreference.com/w/cpp/language/operators
They are my first search for anything C++ as most things in the language these days weren't there when I learned it. Since my C++ was for embedded systems, we didn't use a lot of the features added after that.
Other places that might be fine:
https://www.geeksforgeeks.org/operator-overloading-c/
https://www.programiz.com/cpp-programming/operator-overloading
+ 8
No, I retired in 2016.
+ 7
I started with C in 1975. C with classes in 1980 (coworker was student of Bjarne Stroustrup.) This became renamed as C++ in 1983.
+ 6
Do you have any code you are trying to make work as this is way too big of a topic to answer in a post. I've got a sample here:
https://code.sololearn.com/cStdw0OPtPxG
If you ask about a line or two at a time, I should be able to help you.
+ 5
I learned Fortran and Cobol in 1973, having a job programming for my college.
+ 4
John Wells I now have a sense of what the younger members here might think when I tell them I've been professionally programming since 1996, which was near or before when many here were born.
You've been doing this since the year I was born. đ¶ You, sir, truly are a legendary O.G. đ đ
+ 2
Nice! Are you still professionally active today? If so, what are you doing these days?
+ 1
You probably know that strings and ints behave differently when you add them:
"1" + "1" - > 11
1 + 1 - > 2
By operator overload you can define for your own types, what should happen when you use an operator like for example +.
+ 1
John Wells How long have you been programming programming in C++???
+ 1
John Wells thank you,sirđ
0
John Wells i know this is a large topic and i have so many questions,so can you plz refer me any good resources where i can understand the concept better??