Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef _LINKEDLIST_H
- #define _LINKEDLIST_H
- #include "stack.h"
- struct elements{
- int element;
- elements* pNext;
- };
- typedef struct elements elements;
- void push(myStack *s, int element); // insert element to top of the stack
- int pop(myStack *s); //remove element from top of the stack
- #endif
- #ifndef _MYSTACK_H
- #define _MYSTACK_H
- #include "linkedList.h"
- struct myStack{
- int maxSize;
- int count;
- bool empty;
- elements* firstElement; //the problem is in this line*********************
- };
- typedef struct myStack myStack;
- void initStack(myStack *s, int size);
- void cleanStack(myStack *s);
- bool isEmpty(myStack *s);
- bool isFull(myStack *s);
- #endif
- elements* firstElement;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement