Advertisement
raju02

Template Generic function

Jan 13th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. /// Template Generic Function
  2. #include <iostream>
  3. using namespace std;
  4. template <class T1 , class T2>
  5. void print (T1 a , T2 b)
  6. {
  7. cout<<a << " " << b << endl;
  8. }
  9. int main()
  10. {
  11. print(1, "Raihan");
  12. print(2,5);
  13. print(1 , 3.9912);
  14.  
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement