title: not familiar with c++ pointer, need help
body: <p>on the line <code>*binSon[0].add(x);</code>, it give me an error, an expression must have a class type, what do i do?   </p>
  
  <pre><code>struct Rectangle
  {
      tName Name; //name of the rectangle
      struct Rectangle *binSon[NDIR_1D]; //left and right son
      int Center[NDIR_1D];
      int Length[NDIR_1D];
  
      void add(Rectangle x){
          if(strcmp(x.Name,Name)&lt;0)
          {
              if(binSon[0]==NULL)
                  binSon[0]=&amp;x;
              else
                  *binSon[0].add(x);
  
          }else{
              if(binSon[1]==NULL)
                  binSon[1]=&amp;x;
              else
                  *binSon[1].add(x);
          }
      }
  };
  </code></pre>