title: Vector does not accept new element properly
body: <p>I see some odd behaviour in the code below. My console is printing </p>
  
  <blockquote>
    <p>0lo1lo</p>
  </blockquote>
  
  <p>when in reality I am expecting </p>
  
  <blockquote>
    <p>0Hel1lo</p>
  </blockquote>
  
  <p>Node.cpp</p>
  
  <pre><code>std::vector&lt;Node&gt; Node::getChildren() {
      return children;
  }
  
  void Node::setChildren(std::vector&lt;Node&gt; childrenNodes) {
      children = childrenNodes;
  }
  
  void Node::addChild(Node child) {
      children.push_back(child);
      std::cout &lt;&lt; child.getTitle();
  }
  
  std::string Node::getTitle() {
      return title;
  }
  </code></pre>
  
  <p>From Main function</p>
  
  <pre><code>Node root = Node("root");
  root.addChild(Node("Hel"));
  root.addChild(Node("lo"));
  std::cout &lt;&lt; "\n";
  std::vector&lt;Node&gt; children = root.getChildren();
  for (int i = 0; i &lt; children.size(); i++) {
      Node menuItem = children[i];
      std::cout &lt;&lt; i;
      std::cout &lt;&lt; menuItem.getTitle();
  }
  std::cout &lt;&lt; "\n";
  </code></pre>
  
  <p>Does anybody have an idea why getChildren() appears to be getting a vector that is not accurately listing the first element I inserted?</p>