/ Published in: C++
Expand |
Embed | Plain Text
//stog_polje.h //Luka Rajcevic #include <iostream> using namespace std; struct tautomobil { int ser_broj; char proizvodac[40]; char model[40]; int god_proizvodnje; }; struct tautomobili { tautomobil automobil[100]; int top; }; tautomobili *pom = new tautomobili; void InitS (tautomobili *stog) { stog->top = 99; } void PushS(tautomobil x, tautomobili *stog) { stog->automobil[stog->top]=x; stog->top--; } void PopS(tautomobili *stog) { stog->top++; } bool IsEmptyS(tautomobili *stog) { if (stog->top==99) return true; else return false; } tautomobil TopS(tautomobili *stog){ return(stog->automobil[stog->top+1]); }
You need to login to post a comment.
