title: Type value mismatch error with vectors
body: <p>I get the following error message when I try to run my program:</p>
  
  <pre><code> main.cpp|44|error: type/value mismatch at argument 1 in template
   parameter list for 'template&lt;class _Tp, class _Alloc&gt; class
   std::vector' main.cpp|44|error: expected a type, got '(render)3u'
   main.cpp|44|error: template argument 2 is invalid main.cpp|44|error:
   invalid type in declaration before ';' token
   === Build finished: 4 errors, 0 warnings (0 minutes, 0 seconds) ===
  </code></pre>
  
  <p>And here is my code for main leading up to the error causing line:</p>
  
  <pre><code>#include&lt;stdlib.h&gt;
  #include&lt;windows.h&gt;
  #include&lt;GL/glut.h&gt;
  #include&lt;GL/freeglut.h&gt;
  #include&lt;iostream&gt;
  #include &lt;vector&gt;
  #include "include/Block.h"
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  #include "include/TextBlock.h"
  #include "include/Enemy.h"
  string text;
  stringstream ss;
  enum render {Normal,SelectRangeText,SelectSText,Enemy,EnemyTypeSelection};
  enum render state;
  enum type { Foreground, Background, Midground };
  enum type selected;
  enum types { Blocks, Enemies, Text };
  enum types special;
  string names[4]  = { "grass" , "smallGrassBlock" , "dirt" , "sand" };
  void createEnemy(int,int);
  void addEnemyWaypoint(int,int);
  void addToList(vector&lt;Block&gt; &amp;list,int x,int y);
  void placeText(int x,int y);
  void initTextures();
  GLint GetTexture(string file);
  void IdleFunction();
  void removeBlock(int x,int y);
  int xOffset,yOffset,multiuse = 0;
  using namespace std;
  string to_string(int number);
  void placeBlock(int x,int y);
  void drawBitmapText(char *string, float x, float y, float z);
  void reshape(int w, int h);
  void render(void);
  void keyboard(unsigned char c,int x,int y);
  void mouse(int button,int state, int x, int y);
  void arrows(int key, int x, int y );
  std::vector &lt;Block&gt; backBlockList;
  std::vector &lt;TextBlock&gt; textBlockList;
  std::vector &lt;Block&gt; midBlockList;
  std::vector &lt;Block&gt; foreBlockList;
  std::vector &lt;Enemy&gt; enemyList;//error occurs here
  GLuint  textures[1];
  unsigned int screenXSize=800;
  unsigned int screenYSize=800;
  unsigned int selectedBlockType = 1;
  int main(int argc, char ** argv)
  {
  </code></pre>
  
  <p>The header for enemy:</p>
  
  <pre><code>#ifndef ENEMY_H
  #define ENEMY_H
  #include&lt;GL/freeglut.h&gt;
  #include &lt;vector&gt;
  class Enemy
  {
      public:
          Enemy(int Type );
          virtual ~Enemy();
          void render(int,int,GLuint);
          void addWaypoint(int,int);
      protected:
      private:
          int type;
          std::vector &lt;int&gt; X, Y;
          int xsize,ysize;
  };
  #endif // ENEMY_H
  </code></pre>
  
  <p>And the constructor for enemy:</p>
  
  <pre><code>Enemy::Enemy(int Type)
  {
      xsize=30;
      ysize=30;
      type=Type;
  }
  </code></pre>
  
  <p>However it will run corrrectly if I substitute the type of my vector to an int.
  When the following line is commented out: std::vector  enemyList; it compiles, however if it's there it doesn't
  when declaring an Enemy like this 
  Enemy e(5);</p>
  
  <p>it runs correctly</p>
  
  <p>Updates: 
  If i change the enemy header, and cpp  to something like the following:</p>
  
  <p>CPP:</p>
  
  <pre><code>#include "../include/Enemy.h"
  
  
  Enemy::Enemy( )
  {
  
  }
  
  
  Enemy::~Enemy()
  {
      //dtor
  }
  </code></pre>
  
  <p>Header</p>
  
  <pre><code>#ifndef ENEMY_H
  #define ENEMY_H
  
  class Enemy
  {
      public:
  
          Enemy(  );
          ~Enemy();
  
      protected:
      private:
  
  };
  
  
  
  #endif // ENEMY_H
  </code></pre>
  
  <p>It still crashes with the same error, this means it must be something in main</p>
  
  <p>FIX: 
  For some reason when I declare it in the line above my enums it works, however if below it doesn't, I have no idea why. If someone could explain this please go ahead.</p>