title: How do I initialize the vector I have defined in my header file?
body: <p>I have the following in my Puzzle.h</p>
  
  <pre><code>class Puzzle
  {
      private:
          vector&lt;int&gt; puzzle;
      public:
          Puzzle() : puzzle (16) {}
          bool isSolved();
          void shuffle(vector&lt;int&gt;&amp; );
  };
  </code></pre>
  
  <p>and then my Puzzle.cpp looks like:</p>
  
  <pre><code>Puzzle::Puzzle()
  {
      // Initialize the puzzle (0,1,2,3,...,14,15)
      for(int i = 0; i &lt;= puzzle.size(); i++)
      {
          puzzle[i] = i;
      }
  }
  
  // ... other methods
  </code></pre>
  
  <p>Am I using the initializer list wrong in my header file?  I would like to define a vector of ints and initialize its size to that of 16.  How should I do this?</p>
  
  <p>G++ Output:</p>
  
  <pre><code>Puzzle.cpp:16: error: expected unqualified-id before ')' token
  Puzzle.cpp: In constructor `Puzzle::Puzzle()':
  Puzzle.cpp:16: error: expected `)' at end of input
  Puzzle.cpp:16: error: expected `{' at end of input
  Puzzle.cpp: At global scope:
  Puzzle.cpp:24: error: redefinition of `Puzzle::Puzzle()'
  Puzzle.cpp:16: error: `Puzzle::Puzzle()' previously defined here
  </code></pre>