title: 'list' was not declared in this scope
body: <p>I am new to c++, and I am trying to get a basic program to initialize a list of short unsigned integers. I am compiling and running using scygwin and g++.</p>
  
  <p>Below is the code in the .cpp file:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt;
  #include &lt;typeinfo&gt;
  using namespace std;
  
  
  int main (int argc, char* argv[]) {
  
  list&lt;int&gt; events;
  
  return 0;
  }
  </code></pre>
  
  <p>which I run by typing the following command into cygwin terminal:</p>
  
  <pre><code>$ g++ -o test.out test.cpp
  </code></pre>
  
  <p>However, I get the following compilation errors:</p>
  
  <blockquote>
    <p>test.cpp: In function ‘int main(int, char**)’: test.cpp:16:1: error:
    ‘list’ was not declared in this scope  list events;<br>
     ^
    test.cpp:16:6: error: expected primary-expression before ‘int’ 
    list events;
         ^</p>
  </blockquote>
  
  <p>I am confused about why list is not in the scope, since I am using namespace std? I found a similar question asked about this on a c++ forum, but my problem would be resolved with that. Anyone know what the problem is here?</p>
  
  <p>-Paul</p>