diff options
| author | Connor McDowell <[email protected]> | 2024-02-10 15:54:35 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-10 15:54:35 -0800 |
| commit | c7d3c18c684b6eb34198098385820eb42808032c (patch) | |
| tree | 3f49966d66f1aa0c03e7700ce3715264bf53e134 /Project1/contacts.cpp | |
| parent | add deadline (diff) | |
| download | archived-homework-5-connormcdowell275-c7d3c18c684b6eb34198098385820eb42808032c.tar.xz archived-homework-5-connormcdowell275-c7d3c18c684b6eb34198098385820eb42808032c.zip | |
testing ins, struct manipulation and list manipulation
Diffstat (limited to 'Project1/contacts.cpp')
| -rw-r--r-- | Project1/contacts.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Project1/contacts.cpp b/Project1/contacts.cpp new file mode 100644 index 0000000..d47aeba --- /dev/null +++ b/Project1/contacts.cpp @@ -0,0 +1,62 @@ +#include "Contacts.h" +#include <iostream> +#include <list> +# + +using std::cin; +using std::cout; +using std::endl; +using std::list; + +struct contact +{ + char Name[25] = {}; + char Email[100] = {}; + char StreetAddress[35] = {}; + char City[30] = {}; + char State[2] = {}; + int Zip = 97034; +}; + +void myList() +{ + char t, s; + int i; + i = 100; + std::list<char> myList(i, t); + + +} + +char addNew() +{ + // prompt user input w/o spaces + + contact newContact; + cin >> newContact.Name; + cout << newContact.Name << endl; + cin >> newContact.Email; + cout << newContact.Email << endl; + cin >> newContact.StreetAddress; + cout << newContact.StreetAddress << endl; + cin >> newContact.City; + cout << newContact.City << endl; + cin >> newContact.State; + cout << newContact.State << endl; + cin >> newContact.Zip; + cout << newContact.Zip << endl; + + + + return 0; +} + +//for (auto const& i : name) +//{ +// cout << i << endl; +//} + +// add: prompt add, get cin for contact.name contact.email contact.address contact.city and contact.zip +// add update: find struct through name value (if contact.name == i = cin pull up that struct and do similar +// to add) and save over it +// add: print all contacts.
\ No newline at end of file |