Corsi
AccediInizia a imparare l'IA
Corsi
AccediInizia a imparare l'IA

Discussioni Q&A

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 Voti
8 Risposte
5th Sep 2016, 3:38 AM
Pranav Dixit
Popolare oggi
How many time I can use sololearn trial mode?
1 Votes
Ошибка в приложении Sololearn
1 Votes
Is anyone else experiencing this Sololearn issue?
0 Votes
NEO V2.0
1 Votes
Did sololearn helped you to get easier a job?
1 Votes
Hello guys,
1 Votes
solo learn program issue - iPhone?
1 Votes
Sololearn course
1 Votes
Payment by account
0 Votes
Python
0 Votes