Template Functions

For this lab you will create several functions using template parameters

A sample main to test your functions has been provided for you have your output to the console AND THE LOG 
match the runme_example



you will complete the functions in "template_functions.h"
File: template_functions.h 

#include <iostream>
#include "cmpslib19.h"
#include "easylogging++.h"




// here are copies of GetLarger and GetSmaller for datatype char*

// you do NOT want to use the operators <,>,== because you will be comparing the pointers

const char * GetLarger (const char* a, const char* b)
{
	LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
	const char *temp = (strcmp(a,b) <= 0) ? b:a;
	LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
	LOG(INFO) << "Returning " << temp << endl;
	return temp;
}

const char * GetSmaller (const char* a, const char* b)
{
	LOG(INFO) << "Start " <<  __PRETTY_FUNCTION__ << endl;
	const char *temp = (strcmp(a,b) >= 0) ? b: a;
	LOG(INFO) << "End " <<  __PRETTY_FUNCTION__ << endl;
	LOG(INFO) << "Returning " << temp << endl;
	return temp;
}


// T GetLarger (T a, T b)
// return the larger value a or b


// T GetSmaller (T a, T b)
// return the smaller value a or b
// log the value you will return like the examples 


// T GetLarger (T a, T b, T c)
// return the larger value a,b or c
// log the value you will return like the examples 
// you only need to call the GetLarger for 2 parameters twice , first with a & b then use that result to compare with c
// DO NOT USE < or > in this function
// we want to use this function to work for ( char * ) or constant c strings too you cant use < or > on them


// T GetSmaller (T a, T b, T c)
// return the smaller value a,b or c
// log the value you will return like the examples 
// you only need to call the GetSmaller for 2 parameters twice , first with a & b then use that result to compare with c
// DO NOT USE < or > in this function


// void SwapValues( T & a, T & b)
// swap the values in the two parameters passed in
// DO NOT use the "swap" function


// void PromptForValue ( string message, T & val)
// display the text in message 
// use cin to read a value into val