Formatting C++ console output

后端 未结 4 1733
孤城傲影
孤城傲影 2020-12-17 00:41

I\'ve been trying to format the output to the console for the longest time and nothing is really happening. I\'ve been trying to use as much of iomanip as I can

4条回答
  •  伪装坚强ぢ
    2020-12-17 01:28

    Give up on the tabs. You should be able to use io manipulators to set the field width, the fill character, and the format flag (to get left or right justification). Use the same values for the headings as you do for the data, and everything should come out nicely.

    Also beware that you've switched Rating and Acres in your example.

提交回复
热议问题