5-3章运行没问题,也达到了任务目标,不过右边出现了错误信息,不知道是哪里出了问题,帮忙解释下。
/249/5442/8Qvi/hello.c: In function 'Student1':
/249/5442/8Qvi/hello.c:6:5: error: stray '\357' in program
printf("小明在慕课网上学习");
^
/249/5442/8Qvi/hello.c:6:5: error: stray '\274' in program
/249/5442/8Qvi/hello.c:6:5: error: stray '\233' in program
/249/5442/8Qvi/hello.c:7:1: error: expected ';' before '}' token
}
^
/249/5442/8Qvi/hello.c: In function 'Student2':
/249/5442/8Qvi/hello.c:11:54: error: 's' undeclared (first use in this function)
printf("小明在慕课网已经参与学习了"%s"门课程",str);
^
/249/5442/8Qvi/hello.c:11:54: note: each undeclared identifier is reported only once for each function it appears in
/249/5442/8Qvi/hello.c:11:55: error: expected ')' before string constant
printf("小明在慕课网已经参与学习了"%s"门课程",str);
^
/249/5442/8Qvi/hello.c:11:55: error: stray '\357' in program
/249/5442/8Qvi/hello.c:11:55: error: stray '\274' in program
/249/5442/8Qvi/hello.c:11:55: error: stray '\214' in program
/249/5442/8Qvi/hello.c: In function 'main':
/249/5442/8Qvi/hello.c:16:14: error: expected expression before '[' token
char str=[10];
^
/249/5442/8Qvi/hello.c:17:8: warning: assignment makes integer from pointer without a cast [enabled by default]
str="XX";