Simple external sort class in C++