Mega Code Archive

 
Categories / C++ / Data Type
 

Demonstrate the setf() and unsetf() functions

#include <iostream> using namespace std; int main() {   // Set the boolalpha flag on cout.   cout.setf(ios::boolalpha);   cout << true << endl;;   // clear the boolalpha flag.   cout.unsetf(ios::boolalpha);   cout << true << endl;;   return 0; }