K
kaida
Unregistered / Unconfirmed
GUEST, unregistred user!
自定义类型:
MyRec = packed record
Id: integer;
State: Byte
Name: String[255]
end;
有一过程:
procedure SendBuffer(Buff: array of char
length: integer);
rec: MyRec;
...
SendBuffer(rec, sizeof(MyRec));
提示错误:
Incompatible types: 'Array' and 'MyRec'
请教如何将 rec 强制转换为 array of char ?
MyRec = packed record
Id: integer;
State: Byte
Name: String[255]
end;
有一过程:
procedure SendBuffer(Buff: array of char
length: integer);
rec: MyRec;
...
SendBuffer(rec, sizeof(MyRec));
提示错误:
Incompatible types: 'Array' and 'MyRec'
请教如何将 rec 强制转换为 array of char ?