Lightspeed "C" 3.02 Neophyte Question / prob.

Mike Ching ching at pepsi.amd.com
Sat Aug 5 08:02:20 AEST 1989


In article <70 at steven.COM> paul at steven.COM (paul) writes:
=In article <1667 at thumper.bellcore.com>, pff at thumper.bellcore.com (Peter Ferris) writes:
=> Everything runs just fine... TOO fine!  I believe it works, but it's toooo
=> quick!  The console window opens, displays "Hello world!" and 'slams' shut
=> VERY, VERY quickly.  Any suggestions?  I've run this program on other Macs
=
=I had this same problem on a 2 Meg Mac+ and had to put a scanf to accept
=a carriage return.  getchar won't accept a straight carriage return.
=It needs something to chew on.

I usually use the unix_main routine when porting from the command line
environment. Rename your main routine to be _main and include unix_main.c
in your project. (It's 'unix main.c' with no underscore.) Programs will
then prompt for command line arguments and open a final dialog prompting
for a Return or click before exitting.

mike ching



More information about the Comp.lang.c mailing list