tabular - Displaying tables in C++ console window -


cout<<"  name\t"     <<"cat\t"     <<"barcode\t"     <<"price\t"     <<"manufa\t"     <<"stock\t"     <<"sold\t"     <<"exdate\t "     <<"disc"<<endl; (unsigned int i=0; < _storage.size(); i++) {     cout <<i <<":";     _storage[i]->showdata();     cout<<endl; } 

i trying display data in aligned manner.i using `t` character result in misalignment if data in 1 of variable long.

how display data in table form in c++?

you can use setfill , setw set fill char , width of columns. problem going have limit columns right.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -