Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtisQ&A DiscussƵes
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+
0 Voto
8 RespostasOperator overloading
0 Voto
11 RespostasPointer manipulation
2 Votos
4 RespostasWhy it's not working?
1 Voto
1 RespostaThe Example In Lesson
1 Voto
2 RespostasQuente hoje
Does everyone get this for free?
7 Votes
Dynamic library lib file
0 Votes
HTML5 canvas
1 Votes
Jobs
3 Votes
Can we convert website into app
2 Votes
Help! Images! HTML!
0 Votes
I need help with python code
0 Votes