The first thing that comes to my mind is to do a bunch of \\t\'s, but that would cause words to be misaligned if any word is longer than any other word by a few characters.<
For situations like this typically two passes are required: one to discover the max width of each column and another to do the printing. For standard iostreams you can use the width() routine to have the iostream handle the padding for you automatically.