vscode运行程序结果框闪退
问题:
用VS写c/c++程序,运行结果框总是会一闪而退,根本看不到程序运行的结果。
解决方法:
1、在return 0;语句之前, 加上一个 getchar();语句, 如此,getchar会一直等待输入,程序运行结果框也就正常显示运行结果了。
2、在程序末尾加上语句:system("pause");,再加上头文件 #include
3、修改项目配置,右键点击项目,在右键菜单中选择属性,然后在弹出的对话框左侧列表中选择 “配置属性--->链接器--->系统”,然后在右侧的列表中,在第一项 “子系统”的值中 选择 “控制台(/SUBSUSTEM:CONSOLE)”
相关学习推荐:vscode教程
以上是vscode运行程序结果框闪退的详细内容。更多信息请关注PHP中文网其他相关文章!

热AI工具

Undress AI Tool
免费脱衣服图片

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Clothoff.io
AI脱衣机

Video Face Swap
使用我们完全免费的人工智能换脸工具轻松在任何视频中换脸!

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

Gotohttps://code.visualstudio.comanddownloadtheWindowsUserInstaller.2.Runthe.exefile,allowchanges,andselectrecommendedoptionsincludingaddingtoPATHandcreatingadesktopshortcut.3.ClickFinishtolaunchVSCodeafterinstallation.4.Optionallyinstallusefulextens

VSCodeisalightweight,cross-platformcodeeditorwithIDE-likefeaturesviaextensions,idealforwebandopen-sourcedevelopment;2.VisualStudioisafull-featured,Windows-onlyIDEdesignedforcomplex.NET,C ,andenterpriseapplications;3.VSCodeperformsfasteronlower-endma

TorunaPythonscriptwithargumentsinVSCode,configurelaunch.jsonbyopeningtheRunandDebugpanel,creatingoreditingthelaunch.jsonfile,andaddingthedesiredargumentsinthe"args"arraywithintheconfiguration.2.InyourPythonscript,useargparseorsys.argvtoacce

VSCode用户设置存储位置取决于操作系统,通常位于用户配置文件下的特定目录。Windows路径为C:\Users$$用户名]\\AppData\\Roaming\\Code\\User\\settings.json,macOS为/Users\$$用户名]/Library/ApplicationSupport/Code/User/settings.json,Linux为/home$$用户名]/.config/Code/User/settings.jso

InstallWSLandaLinuxdistributionbyrunningwsl--installinPowerShellasAdministrator,thenrestartandsetuptheLinuxdistribution.2.Installthe"Remote-WSL"extensioninVSCodetoenableintegrationwithWSL.3.OpenaprojectinWSLbylaunchingtheWSLterminal,navigat

TochangethefontsizeinVSCode,useoneofthesemethods:1.OpenSettingsviaCtrl ,(orCmd ,onMac),searchfor"fontsize",andadjustthe"Editor:FontSize"value.2.OpenSettings(JSON)fromtheCommandPalette,thenaddormodify"editor.fontSize":e.g

CreateModifyLaunch.JSONINVSCODEBYOPENEDTHERUNANDDEBUGVIEW,SELECTingYourenVironment(例如Python,Node.js)和ConconfiguringItfo ryourtestframework(例如,pytest,jest)。2。setbreakpointsinyourtestfile,selectthedebuggconfiguration,andstartdebuggingwithf5topaus

tochangetheTsizeInvScode,gotofile>“首选项”>“设置”,搜索“ fontsize”,andmodifythe“ editor:fontsize” value.2
