Undeclared identifier, out of scope? (Using a C++ list)
<p>I am trying to access an instance of a list in one of my classes.
However I am getting this error:</p>

<blockquote>
  <p>error C2065: 'blocks' : undeclared identifier
   error C2228: left of '.push_back' must have class/struct/union</p>
</blockquote>

<p>Here's my code:
    #include </p>

<pre><code>class Block{
..
..
};

class Test{
..
..
void doSomething(){
    Block b(70,300,1);
    blocks.push_back(b);
}
};

list&lt;Block&gt; blocks;
Test *test;

int main(){
test-&gt;doSomething();
}
</code></pre>
