Revision: 35900
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 15, 2010 04:07 by returic
Initial Code
struct tauta {
double serijski_broj, godina;
char proizvodac [40], model[20];
};
typedef tauta element;
struct tstog{
element A;
tstog *sljedeci;
};
typedef struct tstog stog;
stog *Y;
int IsEmptyS(stog *S){
if(S->sljedeci == NULL) return 1;
else return 0;
};
element TopS(stog *S){
if(S->sljedeci != NULL){
Y = S->sljedeci;
return Y->A;
}
else exit(1);
};
void PushS(element x, stog *S){
stog *novi = new stog;
novi->A = x;
novi->sljedeci = S->sljedeci;
S->sljedeci = novi;
};
void PopS(stog *S){
if(S->sljedeci != NULL){
Y = S->sljedeci;
S->sljedeci = Y->sljedeci;
delete Y;
}
};
stog *InitS(){
stog *S = new stog;
S->sljedeci = NULL;
return S;
};
Initial URL
Initial Description
Initial Title
Zaglavlje za simulaciju (stog_pokazivac.h)
Initial Tags
Initial Language
C++