TQueue=record
Count:integer;
Items:array of TQueueElement;
end;
这样定义,队列不就成数组了,我是这样定义的
type
TMy_Queue = Class
private
FQueue : TObjectQueue;
FLock : TCriticalSection;
public
constructor Create();
destructor Destroy();override;
function Push(AObject: LongInt):Longint;
function Pop: LongInt;
function Peek: LongInt;
function Count: Integer;
end;
但不知道,队列大小是否可以改变