If you need to determine minimum and maximum in C++ from a certain value or variable then you can try it
int maxNum = max({a,b,c});
int minNum = min({a,b,c});
or
int maxNum = max({n1,n2,n3,n4....nn});
int minNum = min({n1,n2,n3,n4....nn});
where a,b,c and n1,n2,n3...nn are variables or values
Don't use variable name as builtin functions
This is std::initializer_list.
Also try this method for max and min value.
https://stackoverflow.com/questions/23815138/implementing-variadic-min-max-functions