Revision: 35856
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 15, 2010 00:26 by powerlargo
Initial Code
struct automobil { char sb[15]; char proizv[30]; char model[20]; unsigned int godp; }; struct st { automobil value; st *next; }; automobil TopS(st *S) //dobivanje vrijednosti s vrha stoga { S = S->next; return S->value; } void PushS(automobil x, st *S) //dodavanje elementa x na vrh stoga { st *novi = new st; novi->value = x; novi->next = S->next; S->next = novi; } void PopS(st *S) //naredba koja brise vrijednost s vrha stoga { st *brisi = S->next; S->next = brisi->next; delete brisi; } bool IsEmptyS(st *S) //procedura koja provjerava je li stog prazan { if(S->next == NULL) return true; else return false; } st* InitS(st *S) //inicijalizacija praznog stoga (iliti brisanje cijelog stoga) { S = new st; S->next = NULL; return S; }
Initial URL
Initial Description
Initial Title
stog_pokazivac.h
Initial Tags
Initial Language
C++