Solved Hello-world.cpp

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Grex

Newbie
Sep 28, 2015
4
102
0
#include <iostream>

int main()
{
std::cout << "Hello World!\n";
return 0;
}

Instantly closes what am i doing wrong?
 

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
There is nothing stopping the program before it exits. Add getch(), getchar(), (I think there's an std::cin funct you can use), do not use system("PAUSE"), you can use a while loop that checks for a keypress and breaks upon it. They just have to happen before return 0.
 

Styx

Coder
Dank Tier Donator
Nobleman
Aug 14, 2012
117
648
3
If you are using VS then put

C++:
std::cin.get()
after your cout.
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,747
40,528
317
#include <iostream>

int main()
{
std::cout << "Hello World!\n";
__asm jmp $
return 0;
}
 

Grex

Newbie
Sep 28, 2015
4
102
0
Thanks for the easy solution styx worked perfectly. I would think this book would have visual studio in mind maybe microsoft didnt create it in 2005
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Similar threads

Community Mods