Add basic sorting methods in c++