New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
Python func res
-2 Votes
1 AnswerShould I continue ?
1 Vote
2 Answerscan 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+
0 Votes
8 Answersexplanation plzzzz!!!
0 Votes
2 AnswersHot today
Comparing code coach solutions
3 Votes
Automatation python
1 Votes
General python
1 Votes
view challenge analytics
2 Votes
Coding
1 Votes
Problem with application
0 Votes
header only implementation
1 Votes
how to create a website
0 Votes
Folowers
1 Votes
Road Runner!!! ✌🏻🙌🏻
1 Votes