title: C++: Can a class has an object of it's own type?
body: <p>I am trying to solve the Conway's game of life in c++. So according to my design, I have a cell class which contains a list of 8 neighbours, which itself is an object of type cell. Is it ok to do that. The code looks like this</p>
  
  <pre><code>class Cell {
  private:
    int position_row_;
    int position_colm_;
    std::shared_ptr&lt;State&gt; state_;
  
    std::vector&lt;Cell&gt; neighbours_;
  };
  </code></pre>
  
  <p>Now, the other question that is bugging me is, what type of relationship is it. While designing i thought of it to be 'Aggregation'; but now i don't think so. 
  Can someone please clarify?</p>