I am trying to determine the maximum of 2 numbers. I have a cpp file with the following code (my actual cpp is significantly more complex than this, but this is the bare bones of the problem):
The compiler keeps throwing an error, saying that the algorithm header is antiquated, and to use one of the 32 headers found in 17.4.1.2 of the C++ standard. I thought that algorithm was still valid. Is it not valid anymore? (I'm using Eclipse Indigo Service Release 1, if that matters.) I know that I could just write a max function myself, but I was really hoping to use the built-in max function itself. Thanks!
You click the button marked "terminal" or some such, and you get a box that looks mostly empty with a blinking line in it. Then, you type. I would type
V4.0.0 is about 6 years old, so presumably 4.0.1 could probably do with updating but it shouldn't have any problems with the <algorithm> header or library.
Here is 17.4.1.2 of the C++ 2003 standard:
17.4.1.2 Headers
The elements of the C + + Standard Library are declared or defined (as appropriate) in a header.
The C + + Standard Library provides 33 C + + headers, as shown in Table 11: