title: C++: Pass with "typedef" defined class as parameter
body: <p>I am creating an instance Dataset::Ptr data and then I need to pass this instance to another method, but I am having trouble with passing "data" as an argument.</p>
  
  <p>The Dataset class is defined as follows:</p>
  
  <pre><code>//Definition of "Dataset" class in Datset.h
  class Dataset : public Objects
  {
  public:
      typedef boost::shared_ptr&lt;Dataset&gt; Ptr;
  
  ...
  
          void foo(); 
  </code></pre>
  
  <p>In the class where I instanciate a "Dataset" object I have:</p>
  
  <pre><code>void doWork(Dataset::Ptr* ds)
  {
  ds-&gt;foo();------&gt;Here I get the error that foo is not defined. ds doesnt have any 
  }
  
  void Function(){
  Dataset::Ptr* ds;
  ....do something with ds....
  doWork(&amp;ds);
  }
  </code></pre>
  
  <p>The error is that boost::shared_ptr cannot be changed into Dataset::Ptr.</p>
  
  <p>What am I doing wrong? How can I pass the instance properly?</p>
  
  <p>Thanks</p>