fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. template <class T>
  6. void add(T a, T b)
  7. {
  8. cout << __LINE__ << ":" << __FUNCTION__ << ": " << a + b << endl;
  9. }
  10.  
  11. int main()
  12. {
  13. int i1 = 10, i2 = 20;
  14. double d1 = 10.2, d2 = 20.3;
  15.  
  16. add(i1, i2);
  17. add(d1, d2);
  18.  
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
8:add: 30
8:add: 30.5