浮名此生分享 http://blog.sciencenet.cn/u/hailangww 工学博士

博文

VC++运行遇到的问题,

已有 996 次阅读 2022-10-9 10:53 |系统分类:科研笔记

#include<cstdio>

int main()

{

int a,b,c;

scanf_s("%d%d%d",&a,&b,&c);

printf("%d,%d,%d\n",a,b,c);

return 0;

}

按debug调试运行,弹出cmd.exe,输入3 4 5后,结果报错如下

'test3.exe': Loaded 'C:\Users\Wukun\Documents\Visual Studio 2010\Projects\vc\test3\Debug\test3.exe', Symbols loaded.

'test3.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Symbols loaded (source information stripped).

'test3.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Symbols loaded (source information stripped).

'test3.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Symbols loaded (source information stripped).

'test3.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded (source information stripped).

The thread 'Win32 Thread' (0x1090) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x35fc) has exited with code 0 (0x0).

The program '[18832] test3.exe: Native' has exited with code 0 (0x0).

改用组合键ctrl+F5,弹出cmd.exe,输入3 4 5后,结果如下:

(原因来自c++ - The program has exited with Code 0 (HELP) - Stack Overflow)


即 program executed faster than you were able to read the output. You didn't specify your IDE but I deduce Visual Studio, in which case try pressing ctrl + F5.

image.png



https://blog.sciencenet.cn/blog-54347-1358642.html

上一篇:看门狗中断程序
下一篇:[转载]PID控制
收藏 IP: 58.34.184.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-27 05:32

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部