aboutsummaryrefslogtreecommitdiff
path: root/Project1/contact.cpp
diff options
context:
space:
mode:
authorConnor McDowell <[email protected]>2024-02-22 18:07:34 -0800
committerConnor McDowell <[email protected]>2024-02-22 18:07:34 -0800
commit1a821c0db8c6f96b484fe73241da7230faef608d (patch)
tree3ec084201170249a9ce4304dc7deb89afefd5694 /Project1/contact.cpp
parenti love following the lecture exactly and getting undefined behavior. (diff)
downloadin-class-exercise-13-connormcdowell275-main.tar.xz
in-class-exercise-13-connormcdowell275-main.zip
completedHEADmain
Diffstat (limited to 'Project1/contact.cpp')
-rw-r--r--Project1/contact.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Project1/contact.cpp b/Project1/contact.cpp
index cfbbb47..884000d 100644
--- a/Project1/contact.cpp
+++ b/Project1/contact.cpp
@@ -9,50 +9,50 @@ using std::endl;
void contact::Set_firstName(const char* firstName)
{
- *_firstName = *firstName;
+ _firstName = firstName;
}
-char* contact::Get_firstName()
+const char* contact::Get_firstName()
{
return _firstName;
}
void contact::Set_lastName(const char* lastName)
{
- *_lastName = *lastName;
+ _lastName = lastName;
}
-char* contact::Get_lastName()
+const char* contact::Get_lastName()
{
return _lastName;
}
void contact::Set_streetAddress(const char* streetAddress)
{
- *_streetAddress = *streetAddress;
+ _streetAddress = streetAddress;
}
-char* contact::Get_streetAddress()
+const char* contact::Get_streetAddress()
{
return _streetAddress;
}
void contact::Set_city(const char* city)
{
- *_city = *city;
+ _city = city;
}
-char* contact::Get_city()
+const char* contact::Get_city()
{
return _city;
}
void contact::Set_state(const char* state)
{
- *_state = *state;
+ _state = state;
}
-char* contact::Get_state()
+const char* contact::Get_state()
{
return _state;
}
@@ -70,10 +70,10 @@ int contact::Get_zip()
void contact::Set_email(const char* email)
{
- *_email = *email;
+ _email = email;
}
-char* contact::Get_email()
+const char* contact::Get_email()
{
return _email;
}