C++ String and other objects and algorithms