c++/min handle white spaces