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);