高手教我!!!!!!11

来源:百度知道 编辑:UC知道 时间:2024/06/27 09:56:30
void enter()
{
static o=0;
printf("\n学号:");
scanf("%u",&students[o].stu_num);

printf("\n姓名:");
scanf("%s",&students[o].stu_name);

printf("\n性别:");
scanf("%s",&students[o].sex);

printf("\n年龄:");
scanf("%u",&students[o].age);

printf("\n籍贯:");
scanf("%u\n",&students[o].birth);
o++;
FILE *fp;
int s;
if((fp=fopen("students.txt","wb"))==NULL)
{
printf("\n不能打开文件\n");
}
if (fwrite(&students[o],sizeof(struct student),1,fp)!=1)
{
printf("\n保存信息出错!\n");
break;
}
printf("\n保存信息成功!\n");
fclose(fp);
}

int pass()
{
char pword[5]={"1234"};
char password[5];
printf("请输入用

C:\Program Files\VC++\MyProjects\www\w.cpp(117)

路过,随便说说。
你那个是C语言程序。应该保存成 .C格式吧。
而不是 .CPP格式的吧。

定义函数违法吗
那就改以下函数名就行了
有一个错就会有一串的错出来