home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Stars of Shareware: Programmierung
/
SOURCE.mdf
/
programm
/
msdos
/
pascal
/
rehack
/
contain
/
queue.cpp
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-06-01
|
367 b
|
26 lines
#include "queue.h"
void queue::destroy()
{
link_node *old_node = tail;
if (tail == NULL)
return;
tail = tail->last;
tail->next = NULL;
delete old_node;
}
containable *queue::remove()
{
containable *result;
if (tail == NULL)
return NULL;
result = tail->item();
tail->empty();
destroy();
return result;
}