我收到一条警告说:“格式指定类型'char *',但参数的类型为'char'”用于学生变量。我正在将一本书中的代码复制/粘贴到 xcode 中,但不知道如何解决这个问题。在控制台中打印的唯一内容是“(lldb)”。任何建议
#include <stdio.h>
void congratulateStudent(char student, char course, int numDays)
{
printf("%s has done as much %s Programming as I could fit into %d days.\n", student, course, numDays);
}
int main(int argc, const char * argv[])
{
// insert code here...
congratulateStudent("mark", "Cocoa", 5);
return 0;
}