Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Tcomplex
- {
- friend Tcomplex operator + (Tcomplex a, Tcomplex b);
- };
- Tcomplex operator + (Tcomplex a, Tcomplex b)
- {
- Tcomplex c;
- c.Im=a.Im+b.Im;
- c.Re=a.Re+b.Re;
- return c;
- }
- main()
- {
- Tcomplex L1(5,6);
- Tcomplex L2(3,2);
- Tcomplex L3();
- L3=L1+L2;
- L3.drukuj();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement