diff --git a/lcthw-remnants-2/ex17-ec.c b/lcthw-remnants-2/ex17-ec.c index 24a2eca..33bc92f 100644 --- a/lcthw-remnants-2/ex17-ec.c +++ b/lcthw-remnants-2/ex17-ec.c @@ -3,6 +3,7 @@ #include #include #include +#include #define MAX_DATA 512 #define MAX_ROWS 100 @@ -153,7 +154,10 @@ void Database_list(struct Connection *conn) int main(int argc, char *argv[]) { - if(argc < 3) die("USAGE: ex17 [action params]", NULL); + char usage[64]; + sprintf(usage, "USAGE: %s [action params]", basename(argv[0])); + + if(argc < 3) die(usage, NULL); char *filename = argv[1]; char action = argv[2][0];