Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- using namespace std;
- class TComplex
- {
- public:
- float Re;
- float Im;
- TComplex::TComplex();
- TComplex::TComplex(float R);
- TComplex::TComplex(float R, float I);
- };
- TComplex::TComplex()
- {
- Re=0;
- Im=0;
- };
- TComplex::TComplex(float R)
- {
- Re=R;
- Im=0;
- };
- TComplex::TComplex(float R, float I)
- {
- Re=R;
- Im=I;
- };
- int main(int argc, char *argv[])
- {
- TComplex jeden(1,7);
- cout<<jeden.Re<<endl;
- cout<<jeden.Im<<endl;
- system("PAUSE");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement