aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-01-26 13:41:05 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-01-26 13:41:05 +0100
commitc25e2b01382bca01a3441172c35199c7b2f5fb7f (patch)
treedaef4624be3ea778dc600864761d72e48b5bf340
parent0d9aa82da7d665c66c996ff45584e7a3de39d629 (diff)
downloadpintos-linked-list-c25e2b01382bca01a3441172c35199c7b2f5fb7f.tar.gz
list students before deleting
-rw-r--r--main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.c b/main.c
index 87f2f01..6b91ebe 100644
--- a/main.c
+++ b/main.c
@@ -47,6 +47,9 @@ void insert(struct list *student_list) {
// Get a student name from the terminal input, remove it from the list and
// deallocate the appropriate memory (if needed).
void delete(struct list *student_list) {
+ list(student_list);
+ printf("Name of student to delete:\n");
+
char *name = read_input();
if (!name) {
printf("Failed to read student name\n");