求助!C语言问题
#include <stdio.h>
#define PASSWORD "1234567"
int verify_password (char *password)
{
int authenticated;
authenticated=strcmp(password,PASSWORD);
return authenticated;
}
main()
{
int vaild_flag=0;
char password[1024];
while(1)
{
printf("please input password:");
scanf("%s",password);
valid_flag = verify_password(password);
if(valid_flag)
{
printf("incorrect password!\n\n);
}
else
{
printf("Congratulation! You have passed the verfication!\n");
break;
}
}
}
这段代码编译时出现错误:
Text1.c(6) : warning C4013: 'strcmp' undefined; assuming extern returning int
Text1.c(17) : error C2065: 'valid_flag' : undeclared identifier
Text1.c(20) : error C2001: newline in constant
D:\VC6.0++\1\Text1.c(21) : error C2143: syntax error : missing ')' before '}'
因为本人刚开始自学C语言底子薄, 希望给帮帮忙!