• Kursy
  • Kompilator kodu
  • Dyskusja
  • Cennik
  • Zespoły
Menu

Dyskusje 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 głosów
8 odpowiedzi
5th Sep 2016, 3:38 AM
Pranav Dixit
Popularne dzisiaj
Can I import any module in python in this app?
1 Votes
Loops and conditions
2 Votes
Algorithm to create maze-like grid
2 Votes
photo upload issue in html code
0 Votes
app for lessons
1 Votes
Any coding competitions?
1 Votes
I can't figure out how to use the getElementById code in JavaScript Code Playground, I've tried multiple times and watched YT
0 Votes
Rise of AI
1 Votes
Need a personal tutor
0 Votes
Community and feed option
0 Votes