コード
struct Student
{
unsigned int ID;
char name[256];
int FileLocLeft;
int FileLocRight;
int FileLocParent;
};
void main()
{
Student CurStudent;
FILE* fp = fopen("d:\\students.bat", "w");
if(fp == NULL)
{
printf("File not found\n");
}
else
{
fseek(fp,0,SEEK_SET);
CurStudent.FileLocLeft = 0;
CurStudent.FileLocParent = 0;
CurStudent.FileLocRight = 0;
CurStudent.ID = 0;
CurStudent.name = "Root";
fwrite(CurStudent,sizeof(Student),1,fp);
}
}
私は 2 つのエラーで問題を抱えています.空所'"