Revision: 53748
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 2, 2011 10:43 by vedranvadunec
Initial Code
struct cekaonica{ int broj_pacjenta; int cekanje ; int proteklo_u_ordinaciji; int prioritet; }; struct pokazivac{ cekaonica elementi; pokazivac *sljedeci; }; struct red{ pokazivac *celo, *zacelje; }; cekaonica FrontQ(red *Red){ return (Red->celo->sljedeci->elementi); }; void InitQ(red *Red){ Red->celo=(pokazivac*)malloc(sizeof(pokazivac)); Red->celo->sljedeci=NULL; Red->zacelje=Red->celo; }; bool IsemptyQ(red *Red){ if(Red->celo==Red->zacelje) return true; else return false; }; void DequeueQ(red *Red){ pokazivac *pomocna; pomocna=Red->celo; Red->celo=Red->celo->sljedeci; free(pomocna); }; bool EnqueueQ(cekaonica x, red *Red){ pokazivac *pomocna; pomocna=new pokazivac; pomocna->elementi=x; pomocna->sljedeci=NULL; Red->zacelje->sljedeci=pomocna; Red->zacelje=pomocna; };
Initial URL
Initial Description
Vedran Vađunec
Initial Title
Cekaonica i pacjenti - red_pokazivac.h
Initial Tags
Initial Language
C++