Advertisement
ChaeYuriya

Assignment 9 : DLL.h

Nov 23rd, 2024
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include <iostream>
  2. #define first(L) L.first
  3. #define last(L) L.last
  4. #define next(P) P->next
  5. #define prev(P) P->prev
  6. #define info(P) P->info
  7.  
  8. using namespace std;
  9.  
  10. struct driver {
  11.     string name;
  12.     float rating;
  13. };
  14.  
  15. typedef driver infotype;
  16. typedef struct elmList *address;
  17.  
  18. struct elmList{
  19.     infotype info;
  20.     address next;
  21.     address prev;
  22. };
  23.  
  24. struct List{
  25.     address first;
  26.     address last;
  27. };
  28.  
  29. address createNewElement(string name,float rating);
  30.  
  31. void CreateList(List &L);
  32. void InsertFirst(List &L,address P);
  33. void DeleteFirst(List &L,address &P);
  34. void ShowList(List &L);
  35. void Reset(List &L);
  36. void SplitData(float N,List &L,List &under,List &upper);
  37.  
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement