|
-
November 8th, 2015, 05:45 AM
#1
setw related
I am trying to output some info and in the legacy code, they used setw. I am trying to match that..
Code:
std::ostringstream os;
os << "Name QualityIndicator MaxUlBitRate MaxDlBitRate nGuarUlBitRate nGuarDlBitRate" << std::endl;
for (; itr != end; ++itr)
{
Data = *p_itr;
os << p_itr.sName << setw(11) << p_itr.nQualityIndicator << setw(30) << p_itr.nMaxUlBitRate
<< setw(53) << p_itr.nMaxDlBitRate << setw(78) << p_itr.nGuarUlBitRate
<< setw(102) << p_itr.nGuarDlBitRate << endl;
}
Is there any suggestions to make this better..I somehow feel setw is not the choice, but may be the legacy code chose this for some reason..May be because i am not a c++ expert, not able to see it.
thanks a lot
~p
Last edited by pdk5; November 8th, 2015 at 05:52 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|