title: C++ Using naked, instead of smart pointers
body: <p>Consider the following code.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  #include &lt;memory&gt;
  int main() {
      std::vector&lt;std::string&gt; vec;
      for(int i =0;i&lt;10;i++){
          vec.push_back("adsf");
      }
      std::string* myPoint = &amp;vec[1];
      *myPoint = "this works";
      std::shared_ptr&lt;std::string&gt; str_ptr = std::make_shared&lt;std::string&gt;(vec[0]);
      str_ptr-&gt;push_back('this does not push_back to the end of the string stored in at vec[0]');
      for(int i =0;i&lt;10;i++){
          std::cout &lt;&lt; vec[i] &lt;&lt; std::endl; //does not print the new value set by str_ptr
      }
  
      return 0;
  }
  </code></pre>
  
  <p>What I want here is to update a value in <code>vec</code> through a pointer. As I've understood smart pointers are no good for this task. Is using a naked pointer here, an acceptable alternative?</p>