• 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
Need suggestions
0 Votes
Hello can anyone help me to learn gdscript
0 Votes
What coding language should i use to make a custom coding language?
0 Votes
Best code for creating games?
0 Votes
progaming
1 Votes
Anyone Learning Godot?
1 Votes
Any easy game ideas for beginners?
0 Votes
Which is more important CSS vs HTML vs JS?
1 Votes
hello world i need help
1 Votes
Which databases are the best at injecting dynamic data within websites, and how can you achieve it?
0 Votes