Arm*_*yan 2 c++ iostream iomanip
为了设置std::skipws
(或std::noskipws
)标志,需要写:
my_input_stream >> std::skipws; //or my_input_stream >> std::noskipws;
Run Code Online (Sandbox Code Playgroud)
但是如何检查标志是否已设置?我需要noskipws
为我的启用operator >>
,但我想在之后恢复先前设置的值。我知道 boost I/O 状态保护程序,但我需要为学生做一个演示,为了这个简单的目的,使用 boost 可能有点矫枉过正。
归档时间: |
|
查看次数: |
296 次 |
最近记录: |