纪录型文件写入时出现问题,求各位鱼油解答
本帖最后由 zishuang 于 2014-8-16 10:41 编辑代码:
type
student=record
sno:integer;
sname:string;
sage:integer;
ssex:string;
end;
var
student1:student;
studentfile:file of student;
begin
student1.sno:=1;
student1.sname:='小红';
student1.sage:=18;
student1.ssex:='女';
assignfile(studentfile,'d:\student.txt');
rewrite(studentfile);
write(studentfile,student1);
close(studentfile);
end.
记事本中的数据为:
从记事本中读出是没问题的,为什么写入后成乱码了
页:
[1]