title: passing std::shared_ptr<<std::vector<double>> to a function
body: <p>I am trying to understand the use of shared_ptrs.  The simple code below</p>
  
  <pre><code>#include&lt;iostream&gt;
  #include&lt;vector&gt;
  #include&lt;memory&gt;
  
  void funct(std::shared_ptr&lt;std::vector&lt;double&gt;&gt; H){
      H-&gt;push_back(1.00); 
  }
  
  int main()
  {
  std::shared_ptr&lt;std::vector&lt;double&gt;&gt; H;
  funct(H);
  return 0;
  }
  </code></pre>
  
  <p>gives me a segmentation fault which I can't seem to understand. What am I doing wrong here?</p>