Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- class base
- {
- public:
- base(int)
- {
- std::cout << "int\n";
- }
- base(float)
- {
- std::cout << "float\n";
- }
- base(int, int)
- {
- std::cout << "int int\n";
- }
- base(float, float)
- {
- std::cout << "float float\n";
- }
- base(int, float)
- {
- std::cout << "int float\n";
- }
- base(float, int)
- {
- std::cout << "float int\n";
- }
- };
- int main()
- {
- base(1);
- base(1.0f);
- base(1, 1);
- base(1.0f, 1.0f);
- base(1, 1.0f);
- base(1.0f, 1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement