[c++] How to find minimum value from vector?