title: correct way to initialize a variable of the type boost::shared_ptr<A>
body: <p>i'm not sure if i'm doing it correct or not hence asking this question ..<br>
  is <strong><code>reset</code> function of <code>boost::shared_ptr</code></strong> pointer can be used to initialize variable of type <code>boost::shared_ptr&lt;A&gt;</code>.
  Below is example code of wat i have done in my code :</p>
  
  <pre><code>struct A
  {
  
  };
  
  struct B
  {
     int x;
     std::string ss;
  
     boost::shared_ptr&lt;A&gt; A_ref; 
  
  };
  
  setdata(struct B *b)
  {
     b-&gt;x=10;
     b-&gt;ss="hello";
  
     b-&gt;A_ref.reset(new A()); // initializing A_ref variable using reset function.
  }
  </code></pre>
  
  <p>the above way of initializing <code>A_ref</code> variable good or does it have any other effect.</p>
  
  <p>Thanks,</p>