Visual C ++ 2012 cout在运行时崩溃 [英] Visual C++ 2012 cout crashes during run time

查看:115
本文介绍了Visual C ++ 2012 cout在运行时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定今天尝试使用Visual Studio 2012 Express。首先要做的就是写 Hello world!应用程序,但是,我无法使其正常运行。我创建了一个Windows控制台应用程序项目,编写了标准代码,并导致运行时错误。

I decided to try Visual Studio 2012 Express today. First thing to do was to write "Hello world!" application, however, I couldn't make it work. I created a Windows console application project, wrote standard code and it resulted in a run-time error.

这是我的代码:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;

    system("pause");
    return 0;
}

看起来好像坏了(也许我错过了什么?)。它在第7行出现运行时错误:

Looks like something is broken (maybe I missed something?). It gets a runtime error at line 7:

http: //img443.imageshack.us/img443/7497/coutbroken.png

有任何帮助吗? :)

推荐答案

您的CPU迫在眉睫。您的编译器可能已设置为本世纪的CPU。您也许可以禁用SSE2等较新的说明。

Your CPU is in urgent need of being junked. Your compiler is probably set for a CPU from this century. You may be able to disable the newer instructions like SSE2.

这篇关于Visual C ++ 2012 cout在运行时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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