0

HELP !!! C++

Operator overloading last question help C++ HELP !!! Test Test:: (Test obj) { newObj; newObj.mem = mem obj.mem; return newObj; }

21st Nov 2017, 4:59 PM
Mark Tsolov
Mark Tsolov - avatar
13 ответов
+ 3
Test Test::operator+(Test obj) { Test newObj; newObj.mem = mem + obj.mem; return newObj; }
2nd Nov 2019, 5:17 PM
Kosar Darvishi
Kosar Darvishi - avatar
+ 1
Here you go. Test Test::operator+(Test obj) { Test newObj; newObj.mem = mem+obj.mem; return newObj; }
23rd Apr 2019, 9:27 AM
Farshid Rahimi
Farshid Rahimi - avatar
+ 1
Test Test::operator+(Test obj) { Test newObj; newObj.mem = mem + obj.mem; return newObj; }
25th Apr 2020, 3:24 AM
V.SATHYA
V.SATHYA - avatar
+ 1
Test Test::operator+(Test obj) { Test newObj; newObj.mem = mem + obj.mem; return newObj; }
26th Apr 2020, 9:47 AM
Farshid Rahimi
Farshid Rahimi - avatar
0
You just declared "newObj" without specifying it's data type. Write "Test" before the "newObj" and see if it works.
5th Dec 2017, 6:01 PM
1604064_Sharif
1604064_Sharif - avatar
0
Here you go. Test Test::operator+(Test obj) { Test newObj; newObj.mem = mem+obj.mem; return newObj; } Hope it helps.
15th Jun 2018, 11:58 AM
Toshi Purwar
0
class Student { public: Student(); Student(); };
12th Dec 2019, 2:38 AM
fatma
0
Test test:operator+(Test obj) { Test newObj; newObj.mem = mem + Obj.mem; return newObj; }
21st Jan 2020, 1:39 PM
M.Mbatha
M.Mbatha - avatar
0
fatma class Student { public: Student(); ~Student(); };
23rd Mar 2020, 2:22 AM
Karina
0
type in the keyboard name to store the address of the current object. ANSWER: This
23rd May 2020, 7:45 PM
Shailesh Kumar meena
Shailesh Kumar meena - avatar
0
what is the keyboard for overloading an operator in c++? ANSWER: operator
23rd May 2020, 7:57 PM
Shailesh Kumar meena
Shailesh Kumar meena - avatar
0
what does oop stand for? ANSWER:- Object oriented programming
26th May 2020, 7:31 PM
Shailesh Kumar meena
Shailesh Kumar meena - avatar
0
thanks all for your support
4th Jun 2020, 3:49 AM
Waled Moumari
Waled Moumari - avatar