title: How to store a const char* in std :: string?
body: <pre><code>    char       *buffer1 = "abc";
  
      const char *buffer2 = (const char*) buffer;
  
      std :: string str (buffer2);
  </code></pre>
  
  <p>This works, but I want to declare the <em>std::string</em> object i.e. <em>str</em>, <strong>once</strong> and use it many times to store different <em>const char</em>*.</p>
  
  <p>What's the way out?</p>