Page MenuHomec4science

get_maximum_template.cpp
No OneTemporary

File Metadata

Created
Sat, Aug 24, 02:21

get_maximum_template.cpp

template<typename T>
T getMaximum(const T & a, const T & b) {
if (a > b)
return a;
return b;
}
int main(){
double a,b;
double res_d = getMaximum(a,b);
int c,d;
int res_i = getMaximum(c,d);
}

Event Timeline