Курсы
ВойтиНачать изучение ИИ
Курсы
ВойтиНачать изучение ИИ

Обсуждения

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
Актуальное сегодня
Error in python
5 Votes
Why Sololearn Removed Our Saved Private Project (Codes), I Can't Find This Option.
2 Votes
Model Context Protocol ? What is it ?
2 Votes
Do you Think Sololearn should add GDscript?
2 Votes
Not Accessing Message Function
0 Votes
Where have they gone
1 Votes
what is wrong with my code?
0 Votes
Certificate
0 Votes
How to get messages?
1 Votes
PYTHON
1 Votes