使用 Visual Studio C++ 时出现 400 多个错误 [英] Over 400 errors when using Visual Studio C++

查看:63
本文介绍了使用 Visual Studio C++ 时出现 400 多个错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一些课程,代码在大学系统上运行良好,但是当我将完全相同的代码传输到我自己的 PC 时,我收到了 400 多条错误消息.这些包括:

I am working on some coursework and the code works perfectly fine on the university system but when I transfer the exact same code to my own PC, I get over 400 error messages. These consist of:

  • 无法打开源文件name.h"
  • 全局范围没有名称"
  • 标识符名称"未定义
  • 缺少显式类型(假设为int")
  • 完整列表在这里https://pastebin.com/CRJd7hAp

我的所有代码都出现这些错误,即使是像 Hello World 程序这样简单的代码

I get these errors on all of my code, even something as simple as a Hello World program

#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!  " << endl;
system("pause");
return 0;
}

我不知道该怎么办.

推荐答案

我重新安装了 Visual Studio 并将 SDK 从 8.1 设置为最新版本.现在一切正常.谢谢

I reinstalled Visual Studio and set the SDK from 8.1 to the newest release. Everything is working fine now. Thank you

这篇关于使用 Visual Studio C++ 时出现 400 多个错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆