Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <complex>
  3. using namespace std;
  4.  
  5. int main() {
  6. complex<int> p;
  7. int m;
  8.  
  9. cin >> p.real() >> p.imag();
  10. cout << p.real() << p.imag();
  11.  
  12. return 0;
  13.  
  14. }
  15.  
  16. // C++14
  17. constexpr T real() const;
  18. constexpr T imag() const;
  19.  
  20. // C++03
  21. T real() const;
  22. T imag() const;
  23.  
  24. // GCC 4.8.x
  25. T &real();
  26. const T &real() const;
  27. T &imag();
  28. const T &imag() const;
  29.  
  30. T real() const; // (1) C++11 まで
  31. constexpr T real() const; // (1) C++14 から
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement