gpt4 book ai didi

c++ - Visual C++ 输出退出得如此之快

转载 作者:塔克拉玛干 更新时间:2023-11-03 08:22:59 25 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
Visual Studio terminates my console application too fast

我是 100% 的 Visual Studio C++ 新手。我也是 C++ 的新手,到目前为止我使用 netbeans 和 cygwin。今天我安装了 Visual C++ 2012 并运行了以下简单代码

// HelloWorld.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>

using namespace std;


int main()
{
cout << "Hello World" << endl;
}

控制台窗口出现了,而且速度太快了,我也没有机会看到输出,提到以下内容。

'HelloWorld.exe': Loaded 'C:\Users\yohan\Documents\Visual Studio 2010\Projects\HelloWorld\Debug\HelloWorld.exe', Symbols loaded.
'HelloWorld.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'HelloWorld.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'HelloWorld.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'HelloWorld.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'HelloWorld.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
The program '[3436] HelloWorld.exe: Native' has exited with code 0 (0x0).

我浏览了互联网,有人建议将项目属性 > 配置属性 > 链接器 > 调试选项卡 > 生成调试信息设置为"is"。这已经设置为是,但仍然不好。我也计划在这个 IDE 中使用 opencv。所以请帮忙!!!

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