G
gondsoft
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
TUserInfo=Record
userNo:String[10];
userName:String[20];
end;
procedure writeStream(userInfo:TUserInfo);
var
stm:TMemoryStream;
begin
stm:=TMemoryStream.Create;
stm.write(userInfo,sizeOf(userInfo));
//上述写入的是类的实例指针,怎么才能将类完全写到流中呢?
end;
TUserInfo=Record
userNo:String[10];
userName:String[20];
end;
procedure writeStream(userInfo:TUserInfo);
var
stm:TMemoryStream;
begin
stm:=TMemoryStream.Create;
stm.write(userInfo,sizeOf(userInfo));
//上述写入的是类的实例指针,怎么才能将类完全写到流中呢?
end;