全部问题 > 当前问题

我用的是vc2010版的编写运行时黑色方框闪一下就自动关了,这是什么问题呢?​

 我用的是vc2010版的。#include<stdio.h>
main()
{
 printf("helloworld");
}

编写完后运行就变成下面这样子了:“小白.c.exe”: 已加载“C:\Users\1\Documents\Visual Studio 2010\Projects\小白.c\Debug\小白.c.exe”,已加载符号。
“小白.c.exe”: 已加载“C:\Windows\SysWOW64\ntdll.dll”,Cannot find or open the PDB file
“小白.c.exe”: 已加载“C:\Windows\SysWOW64\kernel32.dll”,Cannot find or open the PDB file
“小白.c.exe”: 已加载“C:\Windows\SysWOW64\KernelBase.dll”,Cannot find or open the PDB file
“小白.c.exe”: 已加载“C:\Windows\SysWOW64\msvcr100d.dll”,已加载符号。
线程 'Win32 线程' (0x1418) 已退出,返回值为 0 (0x0)。
线程 'Win32 线程' (0x1eac) 已退出,返回值为 0 (0x0)。
程序“[0x2D5C] 小白.c.exe: 本机”已退出,返回值为 0 (0x0)
黑色方框闪一下就自动关了,这是什么问题呢?

黄庭浩 2018-11-4 10:00:07

共 1 个回答

浮生·梦神 2018-11-19 13:27:58

在#include <stdio.h>下一行加上#include <stdlib.h>;再在printf("helloworld")后面加上system("pause"),运行,是窗口不关闭,详情见第一章第二节课。