home *** CD-ROM | disk | FTP | other *** search
- // CONSTRUC.CPP
- // C++ program that illustrates constructors
-
- #include <iostream.h>
-
- class myComplex // beginning of class declaration
- {
- public:
- // default constructor
- myComplex();
-
- // overloaded constructor
- myComplex(double fReal, double fImag=0);
-
- // copy constructor
- myComplex(myComplex& C);
-
- // class interface
- void show();
-
- protected:
- // internal class data
- double m_fReal;
- double m_fImag;
- }; // end of class declaration
-
-