title: strlen() not working with string variable
body: <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cstring&gt;
  
  
  using namespace std;
  
  int main()
  {
      string b="hello";
  
      cout&lt;&lt;b;
  
      int c = strlen(b);
  
      cout &lt;&lt; "Hello world!" &lt;&lt;c&lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>When I try to run this I get the error below</p>
  
  <pre><code>||=== Build: Debug in strlen (compiler: GNU GCC Compiler) ===|
  C:\Users\Waters\Desktop\hellow world\strlen\main.cpp||In function 'int main()':|
  C:\Users\Waters\Desktop\hellow world\strlen\main.cpp|14|error: cannot convert 'std::string {aka std::basic_string&lt;char&gt;}' to 'const char*' for argument '1' to 'size_t strlen(const char*)'|
  ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
  </code></pre>