Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <complex>
- using namespace std;
- int main() {
- complex<int> p;
- int m;
- cin >> p.real() >> p.imag();
- cout << p.real() << p.imag();
- return 0;
- }
- T real() const; // (1) C++11 まで
- constexpr T real() const; // (1) C++14 から
- // C++14
- constexpr T real() const;
- constexpr T imag() const;
- // C++03
- T real() const;
- T imag() const;
- // GCC 4.8.x
- T &real();
- const T &real() const;
- T &imag();
- const T &imag() const;
Add Comment
Please, Sign In to add comment