Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #ifndef _LINKEDLIST_H
  2. #define _LINKEDLIST_H
  3. #include "stack.h"
  4.  
  5. struct elements{
  6. int element;
  7. elements* pNext;
  8. };
  9. typedef struct elements elements;
  10.  
  11.  
  12. void push(myStack *s, int element); // insert element to top of the stack
  13. int pop(myStack *s); //remove element from top of the stack
  14.  
  15. #endif
  16.  
  17. #ifndef _MYSTACK_H
  18. #define _MYSTACK_H
  19. #include "linkedList.h"
  20.  
  21. struct myStack{
  22. int maxSize;
  23. int count;
  24. bool empty;
  25. elements* firstElement; //the problem is in this line*********************
  26. };
  27. typedef struct myStack myStack;
  28.  
  29. void initStack(myStack *s, int size);
  30. void cleanStack(myStack *s);
  31.  
  32.  
  33. bool isEmpty(myStack *s);
  34. bool isFull(myStack *s);
  35.  
  36. #endif
  37.  
  38. elements* firstElement;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement