I get the following two error messages when I compile the below code for a console application. Please help. I don’t understand the error messages. I’m running Microsoft Visual Studio 2008. When I double click on the error messages, it takes me to the vector include file.
error C2039: '_Unchecked_uninitialized_move' : is not a member of 'stdext'
error C3861: '_Unchecked_uninitialized_move': identifier not found
error C2039: '_Unchecked_uninitialized_move' : is not a member of 'stdext'
error C3861: '_Unchecked_uninitialized_move': identifier not found
#include "stdafx.h"
#include <iostream>
#include <vector>
using namespace std;
int main ()
{
int scores[] = {70,80,90,100};
vector<int> scorePercent (scores, scores + sizeof(scores) / sizeof(int) );
cout << endl;
cin.get();
}
Contents of stdafx.h:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
// #pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here
Your code appears to be correct; something appears to be wrong with your compiler or compiler settings. Try recreating the project; if that fails, run a repair install, or uninstall and reinstall the compiler.