-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist.h
29 lines (26 loc) · 878 Bytes
/
list.h
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
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct Mail {
int index;
char from[100];
char to[100];
char title[100];
char message[255];
struct Mail* next;
struct Mail* prev;
} Mail;
void print(Mail* head, int N);
void print2(Mail* head, int* ids);
void printFile(Mail* head, char* file);
Mail* pushFront(Mail* head, int index,char* from, char* to, char* title, char* message); //int a, int b (èç struct exam)
void insert(Mail* head, int index,char* from, char* to, char* title, char* message);
void del(Mail* head, int index);
void edit(Mail* head, int index,char* info/*"from,to,title,message"*/, char* newvalue);
Mail* find(Mail* head, int index);
int* findByTitle(Mail* head, char* value);
int* findBySender(Mail* head, char* value);
int* findByReceiver(Mail* head, char* value);
int size(Mail* head);
void freeList(Mail* head);