-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCountryList.h
47 lines (33 loc) · 1.15 KB
/
CountryList.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef COUNTRY_LIST_H_
#define COUNTRY_LIST_H_
#include <iostream>
#include <string>
#include <sstream>
#include <cstring>
#include <stdio.h>
#include <fstream>
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include <errno.h>
using namespace std;
typedef struct CountryNode{
string country;
struct CountryNode* next;
}CountryNode;
void CountryListPrint(CountryNode * head);
void CountryListPrintInFile(CountryNode * head, ofstream& fileName);
void CountryListPush(CountryNode ** head, string country);
/* Return "true" if "country" is in Country List or "false" if it isn't */
bool CountryListSearch(CountryNode* head, string countryName);
/* Return the address of the string if "countryName" is in Country List or NULL if it isn't */
string* CountryListSearch2(CountryNode* head, string countryName);
/* Return the number of nodes = different countries in the list */
int CountryListCount(CountryNode* head);
/* Delete all nodes in the list */
void CountryDeleteList(CountryNode** head);
string getAllCountries(CountryNode* head, string inputDir);
#endif /* COUNTRY_LIST_H_ */