title: error: field ‘children’ has incomplete type ‘Node [2]
body: <p>When I run this code, i get the error: "Field 'children' has incomplete type 'Node[0]'". I'm coding in C++ and I want to create a Node class which creates in itself two other Node objects and so on, until it reaches the maxDepth. The full error I get:</p>
  
  <pre><code>18:24:16 **** Incremental Build of configuration Debug for project Tests ****
  make all 
  Building file: ../main.cpp
  Invoking: Cross G++ Compiler
  g++ -std=c++0x -O3 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp"
  ../main.cpp:22:17: error: field ‘children’ has incomplete type ‘Node [2]’
    Node children[2];
                   ^
  ../main.cpp:8:7: note: definition of ‘class Node’ is not complete until the closing brace
   class Node {
         ^
  make: *** [main.o] Error 1
  subdir.mk:18: recipe for target 'main.o' failed
  </code></pre>
  
  <p>And the code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  
  using namespace std;
  
  
  
  class Node {
  public:
      int depth;
      bool value;
  
      Node(bool value, int depth, int maxDepth) {
          this-&gt;value = value;
          this-&gt;depth = depth;
          if (this-&gt;depth &lt; maxDepth) {
              children[2] = {Node(false, this-&gt;depth + 1, maxDepth), Node(true, this-&gt;depth + 1, maxDepth)};
          }
      }
  
  private:
      Node children[2];
  };
  
  
  int main() {
  
      Node tree(false, 0, 1);
  
  
      return 0;
  }
  </code></pre>