diff options
| author | Connor McDowell <[email protected]> | 2024-02-22 17:35:24 -0800 |
|---|---|---|
| committer | Connor McDowell <[email protected]> | 2024-02-22 17:35:24 -0800 |
| commit | db9eb2fc87140a14fb7fa6e1a198b8478dadafaa (patch) | |
| tree | 6c7ec89f00796bea965c274596378d991356d934 | |
| parent | add getters and setters (diff) | |
| download | in-class-exercise-13-connormcdowell275-db9eb2fc87140a14fb7fa6e1a198b8478dadafaa.tar.xz in-class-exercise-13-connormcdowell275-db9eb2fc87140a14fb7fa6e1a198b8478dadafaa.zip | |
working on functions
| -rw-r--r-- | Project1/contact.cpp | 8 | ||||
| -rw-r--r-- | Project1/contact.h | 24 |
2 files changed, 16 insertions, 16 deletions
diff --git a/Project1/contact.cpp b/Project1/contact.cpp index 9625029..7b0e570 100644 --- a/Project1/contact.cpp +++ b/Project1/contact.cpp @@ -7,14 +7,14 @@ using std::endl; -char contact::Set_firstName() +void contact::Set_firstName(char firstName) { - + *_firstName = firstName; } -char contact::Get_firstName() +char* contact::Get_firstName() { - + return _firstName; } void contact::print() diff --git a/Project1/contact.h b/Project1/contact.h index d3b439e..47e8fd3 100644 --- a/Project1/contact.h +++ b/Project1/contact.h @@ -6,26 +6,26 @@ class contact public: contact() = default; - char Get_firstName(); - char Set_firstName(); + char* Get_firstName(); + void Set_firstName(char firstName); - char Get_lastName(); - char Set_lastName(); + char* Get_lastName(); + void Set_lastName(); - char Get_streetAdress(); - char Set_streetAdress(); + char* Get_streetAdress(); + void Set_streetAdress(); - char Get_city(); - char Set_city(); + char* Get_city(); + void Set_city(); char* Get_state(); - char* Set_state(); + void Set_state(); - int Get_zip(); + int* Get_zip(); int Set_zip(); - char Get_email(); - char Set_email(); + char* Get_email(); + void Set_email(); void print(); |