
Originally Posted by
slash112
system("PAUSE") means that when I run the program, it doesn't close as soon as it finishes. But it lets you close it by pressing any key.
Don't do that
I'm not sure exactly what you mean by "closing" (you mean the terminal window?)
but good programs finish as soon as they're done, and do not hang for user input unnecessarily
Say you release a program that takes input from stdin does something and outputs to stdout, exiting 0 on success and any other value on error, errors get sent to stderr
I would like to be able to say something like
Code:
slash112_program || echo "Error $?"
or
Code:
cat some_file | slash112_program | less
hanging the program for input at the end breaks program flow
anyway....

Originally Posted by
slayer
How to I package together my code into an exe or something both windows and macs can open?
You can't (well, you can, but it's way more trouble than it's worth)
Either make the various platform & architecture packages yourself
or the easy route - just release the code
If the program's useful, people will package it up for their platform / architecture of choice
Bookmarks