Give the definition for the member function get_element for the class
template Pair discussed in the section “Syntax for Class Templates.”
template<class T>
T Pair<T>::get_element(int position) const
{
if (position == 1)
return first;
else if (position == 2)
return second;
else
{
cout << "Error: Illegal pair position.\n";
exit(1);
}
}