title: C++ empty String constructor
body: <p>I am a C++ beginner, so sorry if the question is too basic.</p>
  
  <p>I have tried to collect the string constrcturs and try all them out (to remember them).</p>
  
  <pre><code>string strA();          // string(); empty string // incorrect
  string strB("Hello");   // string( const char* str)
  string strC("Hello",3); // string( const char* str, size_type length)
  string strD(2,'c');     // string( size_type lenght, const char &amp;c)
  string strE(strB);      // string( const string&amp; s)
  
  cout &lt;&lt; strA &lt;&lt; endl;
  cout &lt;&lt; strB &lt;&lt; endl;
  cout &lt;&lt; strC &lt;&lt; endl;
  cout &lt;&lt; strD &lt;&lt; endl;
  cout &lt;&lt; strE &lt;&lt; endl;
  </code></pre>
  
  <p>All of them works except for the <strong>strA</strong>. It prints "1". <strong>Why? Whats the type of the strA in this case? How can I check the type of stuff when I am unsure?</strong></p>
  
  <p>I have noticed that the correct way is this (which by the way seems to be inconsistent with the other constructors, sometimes parens sometimes no parens):</p>
  
  <pre><code>string strA;
  </code></pre>
  
  <p>ps: question in bold, usual irrelevant answers will be downvoted.</p>