Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void error(char *msg){
- fputs(msg, stderr);
- }
- int main(int argc, char **argv){
- if (argc < 1){
- error("Usage: ./my_program [option] [file]");
- return 1; // The OS/Shell will interpret this as a failure, sometimes saying "[program] returned with an exit status of 1"
- }
- // [do stuff]
- return 0; // The OS/Shell will interpret this as a success
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement