Page 1 of 1

PostPosted: Fri Oct 18, 2002 7:00 pm
by chuckbayes
Hello,

I am new to PocketC, and my C is a little rusty (like about 10 years!). I have created a simple guess the number game. I use gets() to ask for the low and high numbers, then generates a random number. The DO loop runs until the number is guessed correctly, then an alert() reports how many guesses it took. When the user presses "Ok", the next thing the user sees is the Palm Preferences! Is there a method for exiting cleanly that I should be using?

TIA,

Chuck

PostPosted: Sat Oct 19, 2002 12:14 am
by Serge
Yes.

At the end you have to write exit(); like this

main(){

//your codes

exit();

}// end main