How can I output data to the console in a table in C++? There's a question for this in C#, but I need it in C++.
This, except in C++: How To: Best way to draw table in console app (C#)
How can I output data to the console in a table in C++? There's a question for this in C#, but I need it in C++.
This, except in C++: How To: Best way to draw table in console app (C#)
Here's a small sample of what iomanip has:
There are other things you can do as well, like setting the precision of floating-point numbers, changing the character used as padding when using setw, outputting numbers in something other than base 10, and so forth.
http://cplusplus.com/reference/iostream/manipulators/
Check the column value length and also keep the length of value in mind to format.
See how MySQL shell interface was designed, it will give you a good idea.
I couldn't find something I liked, so I made one. Find it at https://github.com/haarcuba/text-table
Here's an exmaple of its output:
Can't you do something very similar to the C# example of:
Like:
Here's a reference I used to make this: http://www.cplusplus.com/reference/clibrary/cstdio/printf/