Advertisement
ChaeYuriya

SLL.h

Nov 3rd, 2024
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #include <iostream>
  2. #define first(L) L.first
  3. #define next(P) P->next
  4. #define info(P) P->info
  5. using namespace std;
  6.  
  7. typedef int infotype;
  8. typedef struct elmList *address;
  9.  
  10. struct elmList{
  11.     string info;
  12.     address next;
  13. };
  14.  
  15. struct List{
  16.     address first;
  17.     address last;
  18. };
  19.  
  20. void createList(List &L);
  21. address createNewElement(string X);
  22. void insertFirst(List &L, address P);
  23. void insertLast(List &L, address P);
  24. void inserAfter(List &L, address &Target,address P);
  25. void deleteFirst(List &L, address &P);
  26. void deleteLast(List &L, address &P);
  27. void deleteAfter(List &L, address Target,address &P);
  28. void Show(List L);
  29. address findInfo(List L,string name);
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement