【发布时间】:2010-12-03 13:44:55
【问题描述】:
我有一行代码在我的输出中将填充值设置为“-”字符,但需要将 setfill 标志重置为其默认的空白字符。我该怎么做?
cout << setw(14) << " CHARGE/ROOM" << endl;
cout << setfill('-') << setw(11) << '-' << " " << setw(15) << '-' << " " << setw(11) << '-' << endl;
我认为这可能有效:
cout.unsetf(ios::manipulatorname) // Howerver I dont see a manipulator called setfill
我是不是走错了路?
【问题讨论】:
标签: c++ manipulators