-
Notifications
You must be signed in to change notification settings - Fork 0
/
lab6b.h
37 lines (30 loc) · 840 Bytes
/
lab6b.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
/*
Lamog-Doiel, Robert
Lab 6B
05/09/2017
HEADER
Dynamically allocate array of pointers to structs from file input.
Names and addresses are in alphabetical order.
Output based on ascending zip code.
Include duplicate entries.
*/
#ifndef LAB6B_H
#define LAB6B_H
#define MAX_RECORDS 50
#define ADDRESS_LINE_N 4
/* Not the best use of memory. Input buffer size == member array size. */
typedef struct Address {
char last_name_first_name[512];
char street_address[512];
char city_state[512];
char zip_code[512];
} Address;
Address* newAddress();
void delAddress(Address*);
Address* setLastNameFirstName(Address*, char*);
Address* setStreetAddress(Address*, char*);
Address* setCityState(Address*, char*);
Address* setZipCode(Address*, char*);
void printAddress(Address*);
Address** zipCodeSort(Address**, unsigned);
#endif