• Курсы
  • Компилятор кода
  • Обсуждения
  • Цены
  • Teams
Menu

Обсуждения

can anyone plz explain me this program step by step?#include <iostream> using namespace std; class MyClass { public: int var; MyClass() { } MyClass(int a) : var(a) { } MyClass operator+(MyClass &obj) { MyClass res; res.var= this->var+obj.var; return res; } }; int main() { MyClass obj1(12), obj2(55); MyClass res = obj1+obj2; cout << res.var; }I am not getting the part inside operator+
c++operator-overloading
0 голосов
8 ответов
5th Sep 2016, 3:38 AM
Pranav Dixit
Актуальное сегодня
Help
1 Votes
Can I get my banned account from sl back i got like 3 months banned/blocking
1 Votes
Python stressed me out
0 Votes
How often can you become a fully stuck developer?
1 Votes
Improve accessibility of this page
0 Votes
Course Doubt
1 Votes
[ReSolved] I paid for the subscription but didn't receive it.
0 Votes
Data analysis
0 Votes
Saved code
0 Votes
Upvoting not work
0 Votes