Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- template <class FIRST, class SECOND>
- FIRST smaller(FIRST a, SECOND b) //FIRST is there for the return type!!!!!!
- {
- return(a < b ? a : b);
- }
- int main()
- {
- int x = 89;
- double y = 56.98;
- cout << smaller(x,y) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement