Use a template function to ensure that it works for any type used.
template <typename T>
T getMinimumValue(T item1, T item2, T item3)
{
T minValue = item1;
if (item2 < minValue)
minValue = item2;
if (item3 < minValue)
minValue = item3;
return minValue;
}
What is function?
A function is a group of related statements that together perform a task. Functions are used to structure programs in a logical way and to reduce the amount of code that needs to be written. Functions are usually self-contained and can be called multiple times within a program. Functions can also be used to pass data between different parts of a program and can be used to create modular code which can be reused in other programs. Functions can be defined to take parameters which can be used to control the operation of the function and the data it returns. The ability to use functions in this way allows for complex programs to be broken down into simpler, more manageable tasks.
To learn more about function
https://brainly.com/question/20379321
#SPJ4