To un-set previously set formatting flags.
void unsetf(fmtflags)
Use the unsetf() function to reset any format flags to a previous condition. You would normally store the return value of setf() in order to achieve this task.
There is no return.
#include <iostream> int main() { using namespace std; double d = 10.01; cout.setf(ios::showpos | ios::showpoint); cout << d << endl; cout.unsetf(ios::showpoint); cout << d << endl; return 0; }
Result:
+10.01 +10.01