From: Lukas Jiriste Date: Thu, 26 Sep 2024 09:00:46 +0000 (+0200) Subject: Print help when inputs don't make sense X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=3798bf87556ea5a095892e3d5af40d4954615c06;p=42%2Fphilosophers.git Print help when inputs don't make sense --- diff --git a/philo/main.c b/philo/main.c index c736ff6..1f9e9cb 100644 --- a/philo/main.c +++ b/philo/main.c @@ -121,6 +121,8 @@ int main(int argc, char **argv) if (parse_input(&diner.setting, argc, argv)) { + printf("The usage is:\n\tphilo PHILO_COUNT TIME_TO_DIE " + "TIME_TO_EAT TIME_TO_SLEEP [NUMBER_TO_BE_WELL_FED]\n"); return (1); } if (init(&diner, &threads))