title: request for a member of non-aggregate type?
body: <p>I'm trying to create a very simple classe to stock a tree. I've created a class for the nodes and a class for the tree which consist in a tab of pointers. My problem is that i cannot access to the public members of my class of nodes(I think).</p>
  
  <p>That's the code of my class: </p>
  
  <pre><code>#include &lt;cmath&gt; 
  #include &lt;iostream&gt;
  #include &lt;cstdio&gt;
  #include &lt;cassert&gt;
  #include &lt;vector&gt;
  
  
  using namespace std;
  
  template &lt;class T&gt;
  class Node : public vector&lt;T&gt; {
  
  public:
       vector&lt;T&gt; enfants;
       T pere; 
       T valeur; 
  
    Node(){valeur=T(0); pere=T(0); enfants= vector&lt;T&gt;();}
    Node(T v){valeur=v; pere=T(0); enfants= vector&lt;T&gt;();}
    Node(T v, T p) {valeur= v; pere=p; enfants=vector&lt;T&gt;();}     
  
  void accouche(const T&amp; x)
  {
     enfants.push_back(x);
  }
  
  
  
  template &lt;class T&gt;
  class Arbre: public Node&lt;T&gt; {
  
  public:
  
        Node&lt;T&gt; * arbre;
  
        Arbre(int n){arbre= new Node&lt;T&gt; [n];}
        Arbre(int n, T a) {arbre= new Node&lt;T&gt; [n]; arbre[0]=Node&lt;T&gt;(a);}
  
  void ajouter(const T&amp; enfant, const int&amp; posf, const T&amp; per, const int&amp; posp )      
  {
  arbre[posp].accouche(enfant);
  arbre[posf]=Node&lt;T&gt;(enfant,per);
  }
  
  
   };
  </code></pre>
  
  <p>And that's my main code</p>
  
  <pre><code>#include &lt;cmath&gt;
  #include &lt;iostream&gt;
  #include &lt;cstdio&gt;
  #include &lt;cassert&gt;
  #include &lt;vector&gt;
  #include "classenode.hpp"
  
  
  using namespace std;
  
  int main()
  
  {
  Arbre&lt;int&gt; a1(4,0);
  
  a1.ajouter(1,1,0,0);
  a1.ajouter(2,2,1,1);
  a1.ajouter(3,3,0,0);
  
  cout&lt;&lt;a1[0].enfants.size()&lt;&lt;endl;
  system("pause");       
  
  }
  </code></pre>
  
  <p>I'ts suppose to have the result "2". But I have this error</p>
  
  <pre><code>32 `enfants' has not been declared 
  32  request for member of non-aggregate type before '.' token 
  </code></pre>
  
  <p>I've tried to use "a1[0]->enfants.size()" but the programe sais that the base operand is not a pointer.</p>
  
  <p>Any tips? Thank you!!</p>