title: Conflict between includes: stdafx.h and <vector> VisualStudio 2012 C++ (error C2953: class template has already been defined)
body: <p>I've been stuck on this problem for too long, and must ask the almighty Stack. Please forgive the simplicity of the issue!</p>
  
  <p>I am working on the BowlingGame kata in VisualStudio 2012 in order to practice their version of unit tests. I'm in the middle of the refactoring section of Test #2, where I add a vector to my Game class in order to save the number of pins rolled.</p>
  
  <p>When I added the vector include to my header, however, I got a compiler error! In fact, it's my unit test class that is throwing the compiler error (not my source code).</p>
  
  <p>I believe the issue is a conflict between the stdafx.h include in the unit test class and the vector include in the source code header, but I'm not sure. It could also be a managed/native C++ issue? I've had to work through a few of those during this exercise.</p>
  
  <p>Below is the compiler error (abbreviated, as it just goes on and on) and the code for my three files so far. Please let me know what I can do to get past this issue. I am trying to use "best practices" for this exercise, so if you see anything else that looks fishy, please do let me know!</p>
  
  <pre><code>1&gt;------ Build started: Project: BowlingGameUnitTests, Configuration: Debug Win32 ------
  1&gt;  BullseyeCoverage Compile C++ 8.7.21 Windows License 7978 
  1&gt;  Copyright (c) Bullseye Testing Technology 1990-2012
  1&gt;CL : Command line warning d9999: changing /clr:safe to -clr
  1&gt;  BowlingGameTest.cpp
  1&gt;c:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include/xrefwrap(156): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'
  1&gt;c:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include/xrefwrap(156): error C2953: 'std::_Result_of&lt;_Ret(__stdcall &amp;)(void),std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil&gt;' : class template has already been defined
  1&gt;          c:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include/xrefwrap(156) : see declaration of 'std::_Result_of&lt;_Ret(__stdcall &amp;)(void),std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil&gt;'
  1&gt;c:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include/xrefwrap(156): error C2953: 'std::_Result_of&lt;_Ret(__stdcall *)(void),std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil&gt;' : class template has already been defined
  1&gt;          c:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/include/xrefwrap(156) : see declaration of 'std::_Result_of&lt;_Ret(__stdcall *)(void),std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil,std::_Nil&gt;'
  </code></pre>
  
  <p>Game.h:</p>
  
  <pre><code>#pragma once
  #include &lt;vector&gt;
  using namespace std;
  
  class Game
  {
  public:
      Game(void);
      ~Game(void);
      void roll( int pins );
      int score();
  
  private:
      int totalScore;
      vector&lt;int&gt; rolls;
      int currentRoll;
  };
  </code></pre>
  
  <p>Game.cpp:</p>
  
  <pre><code>#include "stdafx.h"
  #include "Game.h"
  
  Game::Game(void)
  {
      totalScore = 0;
      currentRoll = 0;
  }
  
  Game::~Game( void )
  {
  }
  
  void Game::roll( int pins )
  {
      totalScore += pins;
      rolls.push_back(pins);
  }
  
  int Game::score()
  {
      return totalScore;
  }
  </code></pre>
  
  <p>BowlingGameTest.cpp:</p>
  
  <pre><code>#include "stdafx.h"
  #include "../BowlingGame/Game.h"
  
  using namespace System;
  using namespace System::Text;
  using namespace System::Collections::Generic;
  using namespace Microsoft::VisualStudio::TestTools::UnitTesting;
  
  namespace BowlingGameUnitTests
  {
      [TestClass]
      public ref class BowlingGameTest
      {
      private:
          Game* game;
  
      public: 
          [TestInitialize()]
          void MyTestInitialize() 
          {
              game = new Game();
          }
  
          void rollMany( int frames, int pins ) 
          {
              for (int i = 0; i &lt; frames; i++)
              {
                  game-&gt;roll(pins);
              }
          }
  
          [TestMethod]
          void gutterGame()
          {
              rollMany(20, 0);
              Assert::AreEqual&lt;int&gt;(0, game-&gt;score());
          }
  
          [TestMethod]
          void testAllOnes()
          {
              rollMany(20, 1);
              Assert::AreEqual&lt;int&gt;(20, game-&gt;score());
          }
      };
  }
  </code></pre>