title: Could anyone tell something about using ::Ptr and new operator when using PCL
body: <p>I tried to declare an object of a PCL class with </p>
  
  <pre><code>typedef pcl::PointCloud&lt;PointNT&gt; PointCloudT;   // in the .h file.
  </code></pre>
  
  <p>and </p>
  
  <pre><code>PointCloudT::Ptr object = new PointCloudT();   // in main func
  PointCloudT::Ptr scene = new PointCloudT();    // and these two triggers the error of
  </code></pre>
  
  <p>1>f:\cpps\pclrclass\pclrclass\main_routine.cpp(10): error C2440: 'initializing' : cannot convert from 'PointCloudT *' to 'boost::shared_ptr>'</p>
  
  <p>but it works if the declaration is given by</p>
  
  <pre><code>PointCloudT::Ptr object(new PointCloudT);   // in main func
  PointCloudT::Ptr scene(new PointCloudT);    // works and correct
  </code></pre>
  
  <p>I am not good at C++ and don't know what the problem is of this error. Could anyone tell a little about it.</p>