* switched printf() with cout where possible * changes to make external_sort compile