C-plus-plus
Version vom 9. Dezember 2018, 15:48 Uhr von Hamatoma (Diskussion | Beiträge)
Links
Beispiel Klasse Complex
class Complex { public: double _real; double _imag; public: Complex(): _real(0), _imag(0) {} Complex(double real, double imag): _real(real), _imag(imag) {} Complex(const Complex &src): _real(src._real), _imag(src._imag) {} Complex& operator =(const Complex& source){ _real = source._real; _imag = source._imag; return *this; } };