Advertisement
ChaeYuriya

Week 5 : SLL.h

Nov 3rd, 2024
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.92 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.  
  6. using namespace std;
  7. const int S = 50;
  8.  
  9. struct masakan {
  10.     int nomor;
  11.     string nama;
  12.     int sisaPorsi;
  13. };
  14.  
  15. typedef masakan infotype;
  16. struct ElmtMsk;
  17. typedef ElmtMsk* address;
  18.  
  19. struct ElmtMsk {
  20.     infotype info;
  21.     address next;
  22. };
  23.  
  24. struct List {
  25.     address first;
  26. };
  27.  
  28. void createNewList(List &L);
  29. void insertLast(List &L, address p);
  30. void deleteFirst(List &L, address &p);
  31. void deleteLast(List &L, address &p);
  32. void deleteAfter(List &L, address prec, address &p);
  33. bool isEmpty(List L);
  34.  
  35. infotype newMasakan(int no,string nama);
  36. address newElementList(infotype m);
  37. void addNelementList(List &L,int N);
  38. void showAllFood(List L);
  39. void showAvailableFood(List L);
  40. address findMinRemaining(List L);
  41. void showBestSeller(List L);
  42. void deleteAllSoldOut(List &L);
  43. void transaction(List &L,int no,int porsi);
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement