title: error: ‘int’ is not a class, struct, or union type`
body: <p>I am getting error for my code. </p>
  
  <pre><code>vector&lt;vector &lt;int&gt; &gt; v;
  deque &lt;TreeNode, int&gt; q;
  pair &lt;TreeNode, int&gt; temp;//, node;
  temp.first=*root, temp.second=0;
  q.push_back(temp);   // error is in this line
  </code></pre>
  
  <p>TreeNode is a structure defined as: </p>
  
  <pre><code>struct TreeNode {
      int val;
      TreeNode *left, *right;
      TreeNode(int x) : val(x), left(NULL), right(NULL) {}
  };
  </code></pre>
  
  <p>The error I am getting on compiling the code is: <code>/usr/include/c++/4.6/bits/stl_deque.h:487:61: error: ‘int’ is not a class, struct, or union type</code></p>
  
  <p>I am still unclear after following <a href="https://stackoverflow.com/questions/16886865/error-double-is-not-a-class-struct-or-union-type">related</a> posts on stackoverflow. Can someone please explain what could be the reason?</p>