• Kurse
  • Code Compiler
  • Diskutieren
  • Preise
  • Teams
Menu

F&A Diskussionen

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 Stimmen
8 Antworten
5th Sep 2016, 3:38 AM
Pranav Dixit
Heute heiß
overloading operators << >>
1 Votes
how does this code function?
2 Votes
.
1 Votes
Default constructor and default assignment operator
0 Votes
My question is about python?
0 Votes
.
0 Votes
i need to learn Coding
0 Votes
Quiz duel
0 Votes
Web
0 Votes
Who is the best one in html can find for more comprehension
1 Votes