From 3798bf87556ea5a095892e3d5af40d4954615c06 Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Thu, 26 Sep 2024 11:00:46 +0200 Subject: [PATCH] Print help when inputs don't make sense --- philo/main.c | 2 ++ 1 file changed, 2 insertions(+) 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)) -- 2.30.2