0

What is needed for max to work with three values

Hi Refer code below: Why max function not working with neither three object of test class nor int class . What is wrong in this code? https://sololearn.com/compiler-playground/cSZ11nxm1HR0/?ref=app

11th Jan 2025, 3:15 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
3 ответов
+ 2
Ketan Lalcheta you forgot to add... #include <algorithm> // Include for std::max
11th Jan 2025, 4:08 PM
BroFar
BroFar - avatar
+ 1
For two object comparison, algorithm header is it not needed ?
11th Jan 2025, 5:10 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
Should still use out of habit but if I recall no reason actually to.
11th Jan 2025, 5:22 PM
BroFar
BroFar - avatar