Question: Consider the following class declaration ( Do not modify the class ) : class PersonType { public: PersonType ( ) ; PersonType ( string n
Consider the following class declaration Do not modify the class :
class PersonType
public:
PersonType;
PersonTypestring n int id string bd;
private:
string
name; int
ID;
string birthday;
;
Explain what is wrong with the following code fragment and write code to correct it:
int main
PersonType family
newBabyAnny Dube", Sept";
Assume family has been
initialised for int i ;
i ; i
if familybirthday newBaby.birthday
cout
family.name share a birthday with
newBaby.name;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
