fork download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6.  
  7. int main(int argc, const char * argv[])
  8. {
  9. auto old_flags = cout.flags();
  10. #define fmt(x) cout << #x << ": " << (ios_base::x & old_flags) << endl
  11. fmt(dec);
  12. fmt(oct);
  13. fmt(hex);
  14. fmt(left);
  15. fmt(right);
  16. fmt(internal);
  17. fmt(scientific);
  18. fmt(fixed);
  19. fmt(floatfield);
  20. fmt(boolalpha);
  21. fmt(showbase);
  22. fmt(showpoint);
  23. fmt(showpos);
  24. fmt(skipws);
  25. fmt(unitbuf);
  26. fmt(uppercase);
  27. }
  28.  
Success #stdin #stdout 0s 4556KB
stdin
Standard input is empty
stdout
dec: 2
oct: 0
hex: 0
left: 0
right: 0
internal: 0
scientific: 0
fixed: 0
floatfield: 0
boolalpha: 0
showbase: 0
showpoint: 0
showpos: 0
skipws: 4096
unitbuf: 0
uppercase: 0