Update kmeans.cpp

bug fix