From 892e2808ec0b280b653d1ac2f04fff9238fc5427 Mon Sep 17 00:00:00 2001 From: Asahel Date: Fri, 1 Mar 2024 11:36:05 -0800 Subject: Added contact list --- Homework 7/program.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Homework 7/program.cpp (limited to 'Homework 7/program.cpp') diff --git a/Homework 7/program.cpp b/Homework 7/program.cpp new file mode 100644 index 0000000..0388026 --- /dev/null +++ b/Homework 7/program.cpp @@ -0,0 +1,58 @@ +// Name: Asahel Lopez +// Date: 3/1/24 +// Class: CST 116 +// Assignment: Homework 7 + +#include + +using std::endl; +using std::cout; +using std::cin; + +int main() { + + class Contact { + char* _firstName{}; + char* _lastName{}; + char* _streetAddress{}; + char* _city{}; + char* _state{}; + int zip{}; + char* _email{}; + + Contact() = default; + + Contact() { + delete[] _firstName; + delete[] _lastName; + delete[] _streetAddress; + delete[] _city; + delete[] _state; + delete[] _email; + + } + class ContactList { + + Contact* contacts_{ nullptr }; + size_t length_{ 0 }; + size_t size_{ 0 }; + + public: + + ContactList() = default; + + ContactList() { + delete[] contacts_; + } + + void AddContact(const Contact& contact) { + + } + void Print() const { + + } + size_t Size()const { + return size_; + } + }; + }; \ No newline at end of file -- cgit v1.2.3