I'm running VS2010, 64-bit Win7. I created a new MFC-project, clicked finish to accept the wizard's default settings and inserted this code into the mainframe constructor:

Code:
#include <vector>

CMainFrame::CMainFrame()
{	
	CArray< std::vector<int>, std::vector<int>> arr;
	
	std::vector<int> vec1;
	vec1.push_back(1);
	arr.Add( vec1 );
	
	std::vector<int> vec2;
	vec2.push_back(2);
	arr.Add( vec2 );

	std::vector<int> vec3;
	vec3.push_back(3);
	arr.SetAt( 0, vec3 );

	std::vector<int> vecFirst = arr.GetAt(0);
		
	CString output;	
	output.Format(_T("%d"), vecFirst.at(0));
	AfxMessageBox(output);
	
	// TODO: add member initialization code here
	theApp.m_nAppLook = theApp.GetInt(_T("ApplicationLook"), ID_VIEW_APPLOOK_VS_2008);
}
I expect to see a messagebox showing "3" when running the application. This works in release mode, but in debug mode throws "0xC0000005: Access violation".

Please, can someone explain why? Or is it just my computer?