Distance Finder for OOP C++