Anyone know where is my M+U result go??
#include <iostream>
using namespace std;
template<class P>
P add(P a, P b){
P result;
result = a + b;
return result;
}
int main() {
int a1 = 5, a2 = 3;
double b1 = 1.2, b2 = 2.3;
char c1 = 'M', c2 = 'U';
string d1 = "Multimedia", d2 = "University";
cout << a1 << " + " << a2 << " = " << add (a1, a2) << endl
<< b1 << " + " << b2 << " = " << add (b1, b2) << endl
<< c1 << " + " << c2 << " = " << add (c1, c2) << endl
<< d1 << " + " << d2 << " = " << add (d1, d2) << endl;
return 0;
}