title: c_str() == NULL not working
body: <p>I was going through legacy code to fix a problem and found out that checking c_str in the following manner does not work. However if I change the comparison to string.empty() it works. So my problem is solved, but I am not sure why the c_str comparison does not work.Any idea why?<br>
  Thanks!<br>
  I am using - gcc version 4.1.2 20080704 (Red Hat 4.1.2-46).  </p>
  
  <pre><code>#include &lt;iostream&gt;  
  using namespace std;  
  int main()
  {
     string a="";
     if (a.c_str() == NULL)
     {
       cout &lt;&lt;"char says empty"&lt;&lt;endl;
     }
     if (a.empty())
    {
      cout &lt;&lt; "string says empty"&lt;&lt;endl;
    } 
   }
  </code></pre>
  
  <p>The output is-<br>
          string says I am empty  </p>