From 570ac37bac74343538038f2ee4b9fefc6ff344e3 Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Mon, 18 Apr 2016 18:54:17 -0700 Subject: [PATCH] Person empty constructor Empty constructor for Person is being declared. --- LogInSystem.cpp | 2 ++ Person.cpp | 8 ++++++++ Person.h | 1 + 3 files changed, 11 insertions(+) diff --git a/LogInSystem.cpp b/LogInSystem.cpp index 367093e..f6a61fe 100644 --- a/LogInSystem.cpp +++ b/LogInSystem.cpp @@ -6,6 +6,7 @@ #include #include #include +#include "Person.cpp" using namespace std; int getUsernameCounter(string, int); @@ -20,6 +21,7 @@ void chgPhoneNo(); void quit(); const int size = 10000; +Person person[size]; string username[size]; string password[size]; string email[size]; diff --git a/Person.cpp b/Person.cpp index 4722bd5..9d3ddb4 100644 --- a/Person.cpp +++ b/Person.cpp @@ -2,6 +2,14 @@ #include "Person.h" using namespace std; +Person::Person() +{ + name = "unknown"; + password = ""; + email = "unknown"; + phoneNo = "555-5555"; +} + Person::Person(string name, string password, string email, string phoneNo) { this->name = name; diff --git a/Person.h b/Person.h index e1a4f73..f4211f4 100644 --- a/Person.h +++ b/Person.h @@ -11,6 +11,7 @@ class Person string phoneNo; public : + Person(); Person(string, string, string, string); void setName(string); string getName();