title: Assigning existing values to smart-ptrs?
body: <p>I am just learning about smart pointers, and I am having trouble assigning a pre-existing location of a variable to the standard library's shared pointer.</p>
  
  <p>For example, lets say you have an int x, which you do not know the value of.  With normal pointers, I just did</p>
  
  <pre><code>int* ptr;
  ptr = &amp;x;
  </code></pre>
  
  <p>I tried both that with shared pointers,  and</p>
  
  <pre><code>std::tr1::shared_ptr&lt;int&gt; ptr;
  ptr = std::make_shared&lt;int&gt; (&amp;x)
  </code></pre>
  
  <p>So i'm fairly lost as to how to do it.</p>