Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstring>
- using namespace std;
- #define MAXLENGHT 10000
- struct tdatum{
- int d,m,g;
- };
- struct tpodaci{
- string sifra;
- char vrsta[16];
- char model[16];
- tdatum datum;
- char boja[16];
- float cijena;
- };
- struct st{
- tpodaci podaci[MAXLENGHT];
- int top;
- }stog,pomocni;
- typedef st stack;
- void InitS(stack S){
- S.top=MAXLENGHT;
- }
- bool IsEmptyS(stack S){
- if(S.top==MAXLENGHT)
- return 1;
- else
- return 0;
- }
- tpodaci TopS(stack S){
- return S.podaci[S.top];
- }
- void PushS(tpodaci x, stack S){
- S.top--;
- S.podaci[S.top]=x;
- }
- void PopS(stack S){
- S.top++;
- }
Advertisement
Add Comment
Please, Sign In to add comment