[SOLVED] My program flashes to quickly in C++ please help!!!

Questions about programming languages and debugging
Post Reply
TURKISH_OG
forum buddy
forum buddy
Posts: 24
Joined: 26 Oct 2005, 16:00
18

[SOLVED] My program flashes to quickly in C++ please help!!!

Post by TURKISH_OG »

Hey, im learning C++ and i made my first program, but when i open the program from outside my compiler it opens and closes realy fast, when in opening inside the compiler if i hold down ctrl+F5 i can view the program without it closing, if i just press F5 it will open and close fast.

Even when i add
int x;
std::cin >> x;
It doesnt make a difference.

Please help!!

Respect,
TURKISH_OG
Last edited by TURKISH_OG on 31 May 2007, 12:15, edited 1 time in total.

User avatar
Nerdz
The Architect
The Architect
Posts: 1127
Joined: 15 Jun 2005, 16:00
18
Location: #db_error in: select usr.location from sucko_member where usr.id=63;
Contact:

Post by Nerdz »

It is weird that even if you have put std::cin >> t; it doesn't wait for a input... at the end of your program, right before the return 0;, put this line : system("pause");
Give a man a fish, you feed him for one day.
Learn a man to fish, you feed him for life.

TURKISH_OG
forum buddy
forum buddy
Posts: 24
Joined: 26 Oct 2005, 16:00
18

Post by TURKISH_OG »

Yeah dont worry i fixed it now :D

alien100
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 693
Joined: 25 Sep 2006, 16:00
17
Location: Spartan HQ
Contact:

Post by alien100 »

th34_krew wrote:Yeah dont worry i fixed it now :D
ye with my help! lol
[img]http://img127.imageshack.us/img127/9128/sig3copyyybq4.jpg[/img]

TURKISH_OG
forum buddy
forum buddy
Posts: 24
Joined: 26 Oct 2005, 16:00
18

Post by TURKISH_OG »

Yeah, the guy above is great :D

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

th34_krew wrote:Yeah, the guy above is great :D
There's a sex joke in there somewhere.....
"The best place to hide a tree, is in a forest"

alien100
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 693
Joined: 25 Sep 2006, 16:00
17
Location: Spartan HQ
Contact:

Post by alien100 »

neo130 wrote:
th34_krew wrote:Yeah, the guy above is great :D
There's a sex joke in there somewhere.....
eww neo common, u started the hotmale thread eww :lol:
[img]http://img127.imageshack.us/img127/9128/sig3copyyybq4.jpg[/img]

User avatar
Nerdz
The Architect
The Architect
Posts: 1127
Joined: 15 Jun 2005, 16:00
18
Location: #db_error in: select usr.location from sucko_member where usr.id=63;
Contact:

Post by Nerdz »

Can you post the fix so other can learn from it as well?
Give a man a fish, you feed him for one day.
Learn a man to fish, you feed him for life.

Post Reply