Home Development Tools VSCode vscode running program result box crashes

vscode running program result box crashes

Feb 12, 2020 pm 03:46 PM
vscode crash

vscode running program result box crashes

Problem:

When I use VS to write a c/c program, the running result box always flashes away, and I can’t see the result of the program running at all.

Solution:

1. Before the return 0; statement, add a getchar(); statement. In this way, getchar will always wait for input, and the program execution result box will display normally. Result.

vscode running program result box crashes

2. Add the statement: system("pause"); at the end of the program, plus the header file #include, so that the running result will be The results are displayed and prompted to press any key to continue.

vscode running program result box crashes

vscode running program result box crashes

3. Modify the project configuration, right-click the project, select Properties in the right-click menu, and then select the list on the left side of the pop-up dialog box Select "Configuration Properties--->Linker--->System", and then in the list on the right, select "Console (/SUBSUSTEM:CONSOLE)" in the value of the first item "Subsystem"

vscode running program result box crashes

Related learning recommendations: vscode tutorial

The above is the detailed content of vscode running program result box crashes. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1596
276
How to install VSCode on Windows How to install VSCode on Windows Jul 27, 2025 am 03:16 AM

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

What is the difference between VSCode and Visual Studio What is the difference between VSCode and Visual Studio Jul 30, 2025 am 02:38 AM

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

How to run Python script with arguments in VSCode How to run Python script with arguments in VSCode Jul 30, 2025 am 04:11 AM

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

Where are VSCode user settings located? Where are VSCode user settings located? Jul 24, 2025 am 02:02 AM

VSCode user settings storage location depends on the operating system and is usually located in a specific directory under the user profile. The Windows path is C:\Users$$username]\\AppData\\Roaming\\Code\\User\\settings.json, macOS is /Users\$$username]/Library/ApplicationSupport/Code/User/settings.json, Linux is /home$$username]/.config/Code/User/settings.jso

How to use VSCode with WSL (Windows Subsystem for Linux) How to use VSCode with WSL (Windows Subsystem for Linux) Aug 01, 2025 am 06:26 AM

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

How to change the font size in vscode? How to change the font size in vscode? Aug 02, 2025 am 02:37 AM

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

How to debug unit tests in VSCode How to debug unit tests in VSCode Aug 01, 2025 am 06:12 AM

Createormodifylaunch.jsoninVSCodebyopeningtheRunandDebugview,selectingyourenvironment(e.g.,Python,Node.js),andconfiguringitforyourtestframework(e.g.,pytest,Jest).2.Setbreakpointsinyourtestfile,selectthedebugconfiguration,andstartdebuggingwithF5topaus

How to change font size in VSCode How to change font size in VSCode Jul 26, 2025 am 04:13 AM

TochangethefontsizeinVSCode,gotoFile>Preferences>Settings,searchfor"fontsize",andmodifythe"Editor:FontSize"value.2.Alternatively,manuallyeditthesettings.jsonfilebyopeningtheCommandPalette,selecting"Preferences:OpenSetti

See all articles