Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example program
- #include <iostream>
- #include <string>
- using namespace std;
- template <class T>
- T Max( T const &t1, T const &t2)
- {
- return t1 > t2 ? t1 : t2;
- }
- int main()
- {
- cout << Max(15,20) << endl;
- cout << Max<double>(2.0,20) << endl;
- }
Add Comment
Please, Sign In to add comment