title: Difference between std::string and const char*?
body: <p>What's the difference between std::string and const char*?
  consider following example</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  int main()
  {
      const char* myName1{ &quot;Alex&quot; }; 
      std::cout &lt;&lt; myName1 &lt;&lt; '\n';
      std::string myName2{ &quot;Alex&quot; }; 
      std::cout &lt;&lt; myName2 &lt;&lt; '\n';
      return 0;
  }
  </code></pre>
  <p>are they the same?</p>