custom type requires an initializer to declare with auto?
<p>I have this type: </p>

<pre><code>  9 class Node {
 10         string name;
 11         int    dependencies;
 12         vector&lt;Node*&gt; children;
 13         unordered_map&lt;string, Node*&gt; map;
 14
 15
 16         public:
 17                 Node(string name) : name(name) {}
 18                 void decrementDependency() { dependencies--;}
 19                 void incrementDependency() { dependencies++;}
 20                 string getName() { return name; }
 21                 vector&lt;Node*&gt; getChildren() { return children; }
 22                 int getNumDependencies() { return dependencies; }
 23
 24                 void addDependent(Node* node) {
 25                         map[node-&gt;getName()] = node;
 26                         children.push_back(node);
 27                         node-&gt;incrementDependency();
 28                 }
 29 };
</code></pre>

<p>and I am trying to iterate through a <code>vector&lt;Node*&gt;</code> in a range-based loop, like so:</p>

<pre><code> for (auto Node* node : children) {
      node-&gt;decrementDependency();
 }
</code></pre>

<p>However, the compiler gives this error, <code>error: declaration of variable 'Node' with type 'auto' requires an initializer</code>. </p>

<p>Why does this happen? Is it because it's a vector of pointers to <code>Node</code>s? </p>