Generic functions

Introduction

Introduction

using multiple classes in a generic function function templates

template <class myType>
myType GetMax (myType a, myType b) {
 return (a>b?a:b);
}

int x,y;
GetMax <int> (x,y);

note: can use

template <class myType>
template <typename myType>

interchangeably