title: Error: "Function" is not a Non static data member or base class of "Class"
body: <p>I'm trying to understand the syntax of C++ since I'm almost fresh to the language, but I dont know what error exactly I'm facing..</p>
  
  <p>I have the <em>Component</em> class implemented on my code and works fine</p>
  
  <pre><code>namespace GUI
  {
  class Component : public sf::Drawable
                  , public sf::Transformable
                  , private sf::NonCopyable
  {
      public:
              //Variables
  };
  }
  </code></pre>
  
  <p>and also the book Im studying asks me to implement another class called <em>Container</em> in the GUI namespace</p>
  
  <pre><code>Container::Container()
  : mChildren()
  , mSelectedChild(-1)
  {
  }
  void Container::pack(Component::Ptr component)
  {
      mChildren.push_back(component);
      if (!hasSelection() &amp;&amp; component-&gt;isSelectable())
          select(mChildren.size() - 1);
  }
  bool Container::isSelectable() const
  {
      return false;
  }
  </code></pre>
  
  <p>What I don't get is the way he is implementing the class, which is giving me the syntax error in the title of the post.. <em>"Error: "mChildren" is not a Non static data member or base class of class "GUI::Container""</em>.</p>
  
  <p>I tryed the futher code:</p>
  
  <pre><code>class Container:
  
  {
  
  Container::Container()
  : mChildren()
  , mSelectedChild(-1)
  {
  }
  void Container::pack(Component::Ptr component)
  {
      mChildren.push_back(component);
      if (!hasSelection() &amp;&amp; component-&gt;isSelectable())
          select(mChildren.size() - 1);
  }
  bool Container::isSelectable() const
  {
      return false;
  }
  };
  </code></pre>
  
  <p>But I'm still getting syntax error =/ what exactly is going wrong and what shoul I read regarding this subject? (I also read C++ guidelines books but I didnt find the answer there cos I probably dont know how to refer to this problem) thanks in advance</p>