Advertisement
sowamaciej

Untitled

Jan 10th, 2020
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. template<typename T>
  2. class Point
  3. {
  4. public:
  5. T x;
  6. T y;
  7. Point(T x, T y)
  8. {
  9. this->x = x;
  10. this->y = y;
  11.  
  12. }
  13. ~Point()
  14. {
  15. }
  16. };
  17.  
  18. class A6 : public Point<int>
  19. {
  20. public:
  21. A6(int x, int y) : Point(x, y) {
  22.  
  23. };
  24. };
  25.  
  26. template<typename T>
  27. class B6 : public Point<T> {
  28. public:
  29. B6(T x, T y) : Point(x, y) {
  30.  
  31. };
  32. };
  33.  
  34.  
  35. template<>
  36. class B6<double> : public Point<double> {
  37. public:
  38. B6(double x, double y) : Point(x, y) {
  39.  
  40. };
  41. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement