Someone can help me.
I have to do the following function below.
Constructs a function to return the largest value among two numbers, using template.
The function should contain a maximum of two parameters.
Actual (actual) parameter values do not can be changed
#include<stdio.h>
#include<iostream>
using namespace std;
template<class T>
void maior(T *Param1 , T *Param2){
T aux;
if(Param1 >= Param2)
aux = *Param1;
else
aux = *Param2;
};
int main()
{
int aux;
int num1 = 3 , num2 = 4;
maior <int>(&num1 , &num2);
cout<<"O maior valor é:"<< aux <<endl;
I do not know if it's this way.