gpt4 book ai didi

c++ - _Unchecked_uninitialized_move???? C++

转载 作者:太空狗 更新时间:2023-10-29 23:08:33 25 4
gpt4 key购买 nike

当我为控制台应用程序编译以下代码时,我收到以下两条错误消息。请帮忙。我不明白错误信息。我正在运行 Microsoft Visual Studio 2008。当我双击错误消息时,它会将我带到 vector 包含文件。

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();
}

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

最佳答案

您的代码似乎是正确的;您的编译器或编译器设置似乎有问题。尝试重新创建项目;如果失败,请运行修复安装,或卸载并重新安装编译器。

关于c++ - _Unchecked_uninitialized_move???? C++,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9060264/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com