title: Is there any reason why the stream cout has the flag std::ios_base::skipws set?
body: <p><code>cout</code> has the flags <code>std::ios_base::skipws</code> and <code>std::ios_base::dec</code> set by default</p>
  
  <p>You can verify this with the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      ios_base::fmtflags flags = cout.flags();
      string sflags;
  
      if( flags &amp; ios_base::skipws ) sflags += "skipws";
      if( flags &amp; ios_base::unitbuf ) sflags += sflags.empty() ? "unitbuf" : " unitbuf";
      if( flags &amp; ios_base::uppercase ) sflags += sflags.empty() ? "uppercase" : " uppercase";
      if( flags &amp; ios_base::showbase ) sflags += sflags.empty() ? "showbase" : " showbase";
      if( flags &amp; ios_base::showpoint ) sflags += sflags.empty() ? "showpoint" : " showpoint";
      if( flags &amp; ios_base::showpos ) sflags += sflags.empty() ? "showpos" : " showpos";
      if( flags &amp; ios_base::left ) sflags += sflags.empty() ? "left" : " left";
      if( flags &amp; ios_base::right ) sflags += sflags.empty() ? "right" : " right";
      if( flags &amp; ios_base::internal ) sflags += sflags.empty() ? "internal" : " internal";
      if( flags &amp; ios_base::dec ) sflags += sflags.empty() ? "dec" : " dec";
      if( flags &amp; ios_base::oct ) sflags += sflags.empty() ? "oct" : " oct";
      if( flags &amp; ios_base::hex ) sflags += sflags.empty() ? "hex" : " hex";
      if( flags &amp; ios_base::scientific ) sflags += sflags.empty() ? "scientific" : " scientific";
      if( flags &amp; ios_base::fixed ) sflags += sflags.empty() ? "fixed" : " fixed";
      if( flags &amp; ios_base::hexfloat ) sflags += sflags.empty() ? "hexfloat" : " hexfloat";
      if( flags &amp; ios_base::boolalpha ) sflags += sflags.empty() ? "boolalpha" : " boolalpha";
      if( flags &amp; ios_base::_Stdio ) sflags += sflags.empty() ? "_Stdio" : " _Stdio";
  
      cout &lt;&lt; "Standard flags from cout stream: " &lt;&lt; sflags &lt;&lt; endl;
  }
  </code></pre>
  
  <p>Clearly the flag <code>std::ios_base::skipws</code> is irrelevant for cout.</p>