This code of c++ do not have any error. Can anybody please explain why.
and why do you think it should have any error???
min is a function provided under algorithm library since C++11.
Look it up here:
http://en.cppreference.com/w/cpp/algorithm/min