C++ Quick Sorting for Data Structures