我有一行代码,它将输出的填充值设为“-”字符,但需要将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
我走错了路吗?