To create columns I use tab spacing in my printf's. When text in a column varies more than a little in length the alignment gets screwed up. Is there a simple way to fix this?
To create columns I use tab spacing in my printf's. When text in a column varies more than a little in length the alignment gets screwed up. Is there a simple way to fix this?
check out the width sub-specifier
http://www.cplusplus.com/reference/c...io/printf.html
edit: I am also a little confused now that I think about it.
Last edited by robwhit; 06-27-2007 at 08:21 AM.
Is this output-related or what you see in the source code? I don't really know what you mean.
Oh cool, thats easy. I guess I should have read a bit about printf. There is quite a bit more you can do with it than I thought.check out the width sub-specifier
Yeah its output related. Just the way the text was aligning when being printed in the console window.Is this output-related or what you see in the source code? I don't really know what you mean.