add sorting and number numbers C++ code