class Complexpublic Complex ; Complexdouble a double b real = a; image = b; ; 运算符重载 friend Complex operator + Complex& aComplex& b; friend Complex operator Complex& a Complex& b; void printcout
Complex operator*(const Complex& a, const Complex& b) { return Complex(a.realb.real - a.imageb.image, a.realb.image + a.imageb.real); }
原文地址: https://www.cveoy.top/t/topic/dnWM 著作权归作者所有。请勿转载和采集!