PRF193_SU25_Final_Exam_4133.webp
K

PRF193_SU25_Final_Exam_4133.webp

Kizspy | Question: 44
(Choose 1 answer)
How do you overload the + operator for a class Complex in C++?
A. Complex operator+(Complex a, Complex b) {
Complex result;
result.real = a.real + b.real;
result.imaga.imag+b.imag;
return result;
B. void operator+(Complex a, Complex b) {}
C. Complex + (Complex a, Complex b) {}
D. friend Complex operator+(Complex a, Complex b);

Thông tin

Category
PRF193
Thêm bởi
Kusakabe2002
Ngày thêm
Lượt xem
536
Lượt bình luận
1
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom