zoukankan      html  css  js  c++  java
  • 程序“[1344] MyProject2.exe: 本机”已退出,返回值为 0 (0x0) 错误解决方法

    笔记本用的是win7 64位的系统,没法再用以前的VC6.0了,所以就用了VS2010,在编写窗口程序的时候,运行的时候总是一闪而过,并输出以下的信息,还真是麻烦呀!

    “MyProject2.exe”: 已加载“D:\vc练习\MyProject2\Debug\MyProject2.exe”,已加载符号。
    “MyProject2.exe”: 已加载“C:\Windows\SysWOW64\ntdll.dll”,Cannot find or open the PDB file
    “MyProject2.exe”: 已加载“C:\Windows\SysWOW64\kernel32.dll”,Cannot find or open the PDB file
    “MyProject2.exe”: 已加载“C:\Windows\SysWOW64\KernelBase.dll”,Cannot find or open the PDB file
    “MyProject2.exe”: 已加载“C:\Windows\SysWOW64\msvcp100d.dll”,已加载符号。
    “MyProject2.exe”: 已加载“C:\Windows\SysWOW64\msvcr100d.dll”,已加载符号。
    程序“[1344] MyProject2.exe: 本机”已退出,返回值为 0 (0x0)。


    我的代码如下:

    #include <iostream>
    using std::cout;
    using std::endl;

    #include "stdlib.h "

    #include <iomanip>
    using std::setw;

    #include <cstdlib>
    using std::rand;

    int main()
    {
    for(int counter=1;counter<=20;counter++)
    {
    //从1到6数字中随机选取,并输出
    cout<<setw(10)<<(1+rand()%6);

    if(counter%5==0)
    cout<<endl;
    }
    return 0;
    }

    后来上网查了一下解决方法,只要在 return 0前面加上 system("pause"); 这行代码以后就没有问题了。

  • 相关阅读:
    我的JavaScript之旅——this到底是啥?
    关闭或修改 IIS 443 端口
    UTF8 GBK UTF8 GB2312 之间的区别和关系
    正则表达式符号解释1
    用 Gmail 的 SMTP 发送邮件
    ASCII 码表
    DNN建立前,需要对其进行一些配置
    XAMPP安装和使用教程(图文并茂)
    Visual Studio IDE 实用小技巧
    第二讲 硬件I/O操作
  • 原文地址:https://www.cnblogs.com/hxxy2003/p/2233324.html
Copyright © 2011-2022 走看看