Gabriel_Rofl

LinkedList.h

Nov 10th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #ifndef __LINKED_LIST_H__
  2. #define __LINKED_LIST_H__  
  3.  
  4. typedef struct elemento{
  5.     int dado;
  6.     struct elemento* proximo;
  7.     struct elemento* anterior;
  8. }t_ele;
  9.  
  10. typedef struct{
  11.     t_ele* inicio;
  12.     t_ele* fim;
  13. }Lista;
  14.  
  15. t_ele* aloca_elemento(int valor);
  16. Lista* aloca_lista();
  17.  
  18. int checar_lista(Lista* list);
  19. void inserir_inicio(Lista* list, int valor);
  20. void inserir_final(Lista* list, int valor);
  21. void acessa_inicio(Lista* list);
  22. void acessa_final(Lista* list);
  23. void inserir(int pos, int valor, Lista* list);
  24. void remove_list(Lista* list);
  25. void print_list(Lista* list);
  26.  
  27. #endif
Add Comment
Please, Sign In to add comment