Advertisement
Josif_tepe

Untitled

May 24th, 2021
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <typename T>
  5. T maximum(T a, T b) {
  6.     if(a < b) {
  7.         return b;
  8.     }
  9.     return a;
  10. }
  11. int main()
  12. {
  13.    
  14.     cout << maximum("abc", "abcd") << endl;
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement