void congratulateStudent(char *student, char *course, int numDays)
the %s
means that you are going to print a string ( array of chars)
and char student
this means that student is a char
type
so student here is not a pointer to a string
In order to change the student type from char to a string pointer you have to add asterisk to student char *student
In your code you are calling the congratulateStudent
with input parameter string "mark"
. So to support this string the input parameter student
should be defined as pointer of string
so you are missing the asterisk in the definition of student
The same thing for course
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…