Cursos
Iniciar sesiónComenzar a aprender IA
Cursos
Iniciar sesiónComenzar a aprender IA

Sesiones de PyR

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 Votos
8 Respuestas
5th Sep 2016, 3:38 AM
Pranav Dixit
En tendencia hoy
Need suggestions
0 Votes
Hello can anyone help me to learn gdscript
0 Votes
Best code for creating games?
0 Votes
What coding language should i use to make a custom coding language?
0 Votes
Need suggestions to learn AI and ML
1 Votes
progaming
1 Votes
Java full stack
0 Votes
Calculator
0 Votes
Anyone Learning Godot?
1 Votes
Duration of heart refilling
0 Votes