C++ Complex Number Class Implementation
#include
class Complex{ private: double real; double imag; public: Complex(){ real = 0; imag = 0; } Complex(double r, double i){ real = r; imag = i; } void Set(double r, double i){ real = r; imag = i; } void Show(){ cout<<real<<'+'<<imag<<'i'<<endl; } };
原文地址: https://www.cveoy.top/t/topic/oyPa 著作权归作者所有。请勿转载和采集!