Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct elem{
- int dane;
- elem * nast;
- }stos;
- void push(elem * &stos,int x){
- elem *el = new elem;
- el->dane = x;
- el->nast=stos;
- stos = el;
- }
- int pop(elem* &stos){
- if(stos){
- elem * temp = stos;
- stos=stos->nast;
- temp->dane;
- delete temp;
- }
- }
- int main()
- {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement