Question: #include #include #include using namespace std; struct patient { string name; char Gender; int d,m,y; string nationality; int civilID; int phoneNumber; string TypeOfInsurance; }; Activities
#include
#include
#include
using namespace std;
struct patient
{
string name;
char Gender;
int d,m,y;
string nationality;
int civilID;
int phoneNumber;
string TypeOfInsurance;
};
Activities
I. Declare a variable from the struct Patient called pat.
II. Fill out the information of pat by reading them from the input.
III. Declare a pointer of type Patient called pat_ptr and assign the address of pat to it.
IV. Change the value of name field of pat by accessing it through pat_ptr.
V. Write all the information inside pat on the output by accessing the fields through pat_ptr.
VI. Declare a second variable from the struct Patient called pat2.
VII.
VIII. Declare a vector of type pointer to struct Patient called pat_ptr_vect IX. Add the address of pat and pat2 to this vector.
X. Print the content of pat_ptr_vect on the output with appropriate prompts.
XI. Include the final code and your outputs inside your workbook and reflect on them.
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
