Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. class base
  4. {
  5. public:
  6.     base(int)
  7.     {
  8.         std::cout << "int\n";
  9.     }
  10.     base(float)
  11.     {
  12.         std::cout << "float\n";
  13.     }
  14.     base(int, int)
  15.     {
  16.         std::cout << "int int\n";
  17.     }
  18.     base(float, float)
  19.     {
  20.         std::cout << "float float\n";
  21.     }
  22.     base(int, float)
  23.     {
  24.         std::cout << "int float\n";
  25.     }
  26.     base(float, int)
  27.     {
  28.         std::cout << "float int\n";
  29.     }
  30. };
  31.  
  32. int main()
  33. {
  34.     base(1);
  35.     base(1.0f);
  36.     base(1, 1);
  37.     base(1.0f, 1.0f);
  38.     base(1, 1.0f);
  39.     base(1.0f, 1);
  40.     return 0;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement