title: How could you cast a shared pointer to a class to a shared pointer to its child class when you are sure that this object points to that childs class?
body: <pre><code>class Parent{
      //some attributes
  }
  class Child: public Parent{
      //same attributes as parent and some more
      void childFunction();
  }
  int main(int argc, char *argv[]){
      std::vector&lt;std::shared_ptr&lt;Parent&gt; vector;
  }
  </code></pre>
  <p>Now during the reading of the vector I know that some pointers in the vector point to Child elements using the function typeId(). But How do I access the 'childFunction()' as an extracted element will have type Parent according to the compiler?</p>