CPP read-write input-output problem

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 ();
}

what result do you expect? What is the error message actually seen?

CPP
Apr.01,2021

this is such a mess. Does the head pointer save the data? The input parameter of head should be changed to const char . Infile is a fstream stream, right? Read (unsigned char buf,int num);
t also has the wrong number

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4787b-65259.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4787b-65259.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?