title: Error 35 error C2661: 'operator new' : no overloaded function takes 2 arguments
body: <p>I am not a proficient C++ programmer and I got a really big project(actually 24 of them) in one Visual Studio Solution.</p>
  
  <p>I get this error from almost all of the project and I can't figure out how to solve it.</p>
  
  <p>When I double click the error it gets me to this place:</p>
  
  <pre><code>for( int i = 0; i &lt; nNewSize; i++ )
  #pragma push_macro("new")
  #undef new
          ::new((void*)(m_pData+i))TYPE;
  #pragma pop_macro("new")
  </code></pre>
  
  <p>The Build Order Output gives me this:</p>
  
  <pre><code>c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxtempl.h(403): error C2661: 'operator new' : no overloaded function takes 2 arguments
  19&gt;          c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxtempl.h(368) : while compiling class template member function 'void CArray&lt;TYPE,ARG_TYPE&gt;::SetSize(INT_PTR,INT_PTR)'
  19&gt;          with
  19&gt;          [
  19&gt;              TYPE=D2D1_GRADIENT_STOP,
  19&gt;              ARG_TYPE=D2D1_GRADIENT_STOP
  19&gt;          ]
  19&gt;          c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxtempl.h(643) : see reference to function template instantiation 'void CArray&lt;TYPE,ARG_TYPE&gt;::SetSize(INT_PTR,INT_PTR)' being compiled
  19&gt;          with
  19&gt;          [
  19&gt;              TYPE=D2D1_GRADIENT_STOP,
  19&gt;              ARG_TYPE=D2D1_GRADIENT_STOP
  19&gt;          ]
  19&gt;          c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxtempl.h(355) : while compiling class template member function 'CArray&lt;TYPE,ARG_TYPE&gt;::~CArray(void)'
  19&gt;          with
  19&gt;          [
  19&gt;              TYPE=D2D1_GRADIENT_STOP,
  19&gt;              ARG_TYPE=D2D1_GRADIENT_STOP
  19&gt;          ]
  19&gt;          c:\program files (x86)\microsoft visual studio 11.0\vc\atlmfc\include\afxrendertarget.h(1028) : see reference to class template instantiation 'CArray&lt;TYPE,ARG_TYPE&gt;' being compiled
  19&gt;          with
  19&gt;          [
  19&gt;              TYPE=D2D1_GRADIENT_STOP,
  19&gt;              ARG_TYPE=D2D1_GRADIENT_STOP
  19&gt;          ]
  </code></pre>
  
  <p>the afxrendertarget.h has this line at 1028</p>
  
  <pre><code>CArray&lt;D2D1_GRADIENT_STOP, D2D1_GRADIENT_STOP&gt;      m_arGradientStops;
  </code></pre>
  
  <p>I have tried to comment in my scripts the lines:</p>
  
  <pre><code>#ifdef _DEBUG
  #define new DEBUG_NEW
  #endif
  </code></pre>
  
  <p>but it had no effect.</p>
  
  <p>Please help me!</p>