Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C++/C Programming › Dos window auto-close

Dos window auto-close

Posts 1–4 of 4 · Page 1 of 1
£X¢¤lÎbûr.
£X¢¤lÎbûr.
Dos window auto-close
I just started reading a book for C++ and have coded Hello World

Code:
#include <iostream.h>

int main()
{
     cout << "Hello World!\n";
     return 0;
}
So I compile it with Dev-C++ and run it, but my dos window flash closes upon executing the script.

Windows Vista 32b (your standard PC)

I can execute it through this process, but it is very lengthy and redundant:

target of CMD.exe shortcut - C:\Windows\System32\cmd.exe /k "C:\dev-cpp\library\untitled1.exe"
#1 · edited 15y ago · 15y ago
SE
SERG
try this line of code before
Code:
return 0;
Code:
system("pause");
i also want to mention since you are a beginner in C, this is an ok way to see what your doing, otherwise it's not safe to use on advance projects.

http://stackoverflow.com/questions/1...hy-is-it-wrong
#2 · edited 15y ago · 15y ago
Kiruku
Kiruku
or

getchar();

but u need to include: #include <stdio.h>
#3 · 15y ago
NA
Nathan
Or you can just use:

Code:
cin.get()
once or twice, and then it waits until you press enter.
#4 · 15y ago
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Tags for this Thread

None