Int the exists=0;
if(! Access (" C: \ work \ stuinfo. TXT ", 0))
The exists=1;
Char a, [20].
Char b [30];
Char c [20];
Char d [20];
If (exists)
{
Fp=fopen (" C: \ \ work \ \ stuinfo TXT ", "at"); There is something wrong with the//at the use of
The fscanf (fp, "% d", & amp; CountOfStudent);
for (int i=0; i
Student stu=new studentNode;
Fscanf (fp, "% s \ n % s % s % s", b, a, c, d);
Stu - & gt; Number=b;
Stu - & gt; Name=a;
Stu - & gt; Banji=c;
Stu - & gt; Sex=d;
//head interpolation
Stu - & gt; Next=studentLink - & gt; next;
StudentLink - & gt; Next=stu;
}
Cout<" Has been loaded!" <" Loaded "& lt;
} else {
Cout<" No local data, please manually create!"
The fclose (fp);
break;
CodePudding user response:
Using the r is an error or something?