Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions