Code:
#include <limits>

// and in main
int highest = std::numeric_limits<int>::min();
int secondhighest = std::numeric_limits<int>::min();
This would be the standard C++ way of doing it.