aboutsummaryrefslogtreecommitdiff
path: root/Project1/Contacts.h
blob: 82a7446547b4c2035591cc85f7b92af5e7b38d71 (plain) (blame)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#ifndef CONTACTS_HEADER_H
#define CONTACTS_HEADER_H

#include <iostream>
using namespace std;

// functions

class contact
{
public:
	// constructors and destructors.
	contact() = default;

	contact& operator=(contact& rhs);

	contact(contact&& move) noexcept;
	contact& operator=(contact&& rhs) noexcept;

	string Get_firstName();
	void Set_firstName(string firstName);

	string Get_lastName();
	void Set_lastName(string lastName);

	string Get_streetAddress();
	void Set_streetAddress(string streetAddress);

	string Get_city();
	void Set_city(string city);

	string Get_state();
	void Set_state(string state);

	int Get_zip();
	void Set_zip(int zip);

	string Get_email();
	void Set_email(string email);

	size_t Get_a();
	void Set_a(size_t a);

	size_t Get_id();
	void Set_id(size_t id);

	void print();

private:
	size_t _a = 0;
	// _a functions as delete bool. if a = 1, the slot is overwritten
	int _id;
	string _firstName;
	string _lastName;
	string _streetAddress;
	string _city;
	string _state;
	int _zip;
	string _email;

};


struct contact_struct
{
	int a = 0;
	//size_t id = contact_list::get_length;
	int id = 0;
	size_t count = 0;
	string firstName;
	string lastName;
	string Email;
	string StreetAddress;
	string City;
	string State;
	int Zip = 0;
	//contact() : a(true), id(0), count(0), Zip(0) {}
};

//struct contact
//{
//    bool a = true;
//    size_t id = 0;
//    size_t count = 0;
//    char Name[25]{};
//    char Email[100]{};
//    char StreetAddress[35]{};
//    char City[30]{};
//    char State[3]{};
//    int Zip = 0;
//};
//contact newContact[11];

//int menu();
//
//char addNew(contact newContact[], size_t MAX, size_t& t);
//
//void update(contact newContact[], size_t MAX);
//
//void printAll(contact newContact[], size_t& MAX);
//
//contact contact_double(contact*& newContact, size_t& MAX, size_t t);
//
//size_t max_double(size_t MAX);
//
//void delete_contact(contact newContact[], size_t MAX);

#endif CONTACTS_HEADER_H