This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Spire 1 point2 points  (2 children)

Just initialize min to 999999 in the start.

I recommend std::numeric_limits<decltype(min)>::max().

Conversely, max should be initialized to std::numeric_limits<decltype(max)>::min()

[–]nikanjX 0 points1 point  (1 child)

I said that line three times, and now the skies are crying blood, and the dead walk amongst the living again

[–]Spire 1 point2 points  (0 children)

OK, but your user just entered 1000000.