topic description
CPP read and write problems
sources of topics and their own ideas
I don"t know how to use the linked list to call the read () function, where head is the header pointer
related codes
/ / Please paste the code text below (do not replace the code with pictures)
infile.open ("student.txt", ios::in);
infile.read ((char *) head,sizeof (student)); while (infile)
{
cout < < head- > num < < "t"; cout < < head- > name < < "t"; cout < < head- > score < < endl; head=head- > next; infile.read ((char *) head,sizeof (student));}
infile.close ();
}