I am looking for a library similar to prettytable but in C++
http://code.google.com/p/prettytable/
I know how to generate one myself using either printf or iostream. However, I would like to know if there is a library for this.
I am interested only in writing this ASCII table to the console.
Preferably something like:
std::vector<std::string> headers;
headers.push_back("My Awesome Header 1");
headers.push_back("My Awesome Header 2");
headers.push_back("My Awesome Header 3");
PrettyTablePrinter ptp;
ptp.SetHeaders(headers);
// Set some other options here
ptp.AddRow(data[0]);
ptp.AddRow(data[1]);
ptp.AddRow(data[2]);
ptp.Print(&std::cout);
Since I have not found a good C++ solution, I have written one for you all
https://github.com/dattanchu/bprinter/wiki
LibFort
It's Fantastic, they have Several cool table styles too.
https://github.com/seleznevae/libfort
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With