diff options
Diffstat (limited to '.boilerplates/c/src/main.c')
-rw-r--r-- | .boilerplates/c/src/main.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/.boilerplates/c/src/main.c b/.boilerplates/c/src/main.c new file mode 100644 index 0000000..10ea279 --- /dev/null +++ b/.boilerplates/c/src/main.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +void print_help() +{ + printf("Help\n"); + exit(1); +} + +int main(int argc, char *argv[]) +{ + if (argc == 2 && (strcmp(argv[1], "--help") == 0)) + print_help(); + + printf("Hello, world!\n"); + return 0; +} |