It's not an error. Windows automatically closes console applications once they're finished. To pause the program before it quits (so you can view the console output), put getchar(); at the end of your program.
John A
Vampirical Lurker
7,630 posts since Apr 2006
Reputation Points: 2,240
Solved Threads: 339
write getchar(); before return. That should pause until you press enter if no characters was left behind in the stdin.
If you can change compiler. Miracle C is broken. Look here for some suggestions
Aia
Nearly a Posting Maven
2,392 posts since Dec 2006
Reputation Points: 2,224
Solved Threads: 218
u can also getch() but it doesnot work in some compiler.
Why do people insist on making bad suggestions, especially after a good suggestion has been made?
And if you read the Rules, they requestyou use the word you, not the letter u, so people that don't speak English well can understand your post.
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944