-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathlist.h
More file actions
60 lines (41 loc) · 1.06 KB
/
list.h
File metadata and controls
60 lines (41 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef LIST_H_INCLUDED
#define LIST_H_INCLUDED
#include <string>
#include <windows.h>
#include <iostream>
#define first(L) L.first
#define last(L) L.last
#define next(P) P->next
#define prev(P) P->prev
#define info(P) P->info
using namespace std;
struct music {
int ID;
string name;
string location;
};
typedef music infotype;
typedef struct elmlist *address;
/**
* IMPLEMENT CIRCULAR DOUBLE LINKED LIST
*/
struct elmlist {
//------------- your code here -----------
//----------------------------------------
};
struct List {
//------------- your code here -----------
//----------------------------------------
};
void createList(List &);
address allocate(infotype );
void deallocate(address &);
void insertFirst(List &, address );
void insertLast(List &, address );
void insertAfter(List &, address &, address);
void deleteFirst(List &, address &);
void deleteLast(List &, address &);
void deleteAfter(List &, address &, address &);
address findElmByID(List, infotype );
address findElmByName(List, infotype );
#endif // LIST_H_INCLUDED