/***************************************************************
* Name: Rafael Orta
* Course: Computer Science & Programming
* Class: CS04103
* Assignment Date: 03/25/22
* File Name: DynamicArrayStack.cpp
*****************************************************************
* Purpose: Demonstrate the creation of a dynamic array on the stack
*****************************************************************/
#include <iostream>
#include <string>
using namespace std;
int main()
{
int noOfPatients = 0;
string line = "====================================================================";
cout << "\n" << line << "\n WELCOME TO CVS PHARMACY MINUTE CLINIC " << endl << line << endl << endl;
cout << "\n\nWhat is the number of patients for the day: ";
cin >> noOfPatients;
cout << endl;
string workDayQueue[noOfPatients];
cin.ignore();
for (int x = 0 ; x < noOfPatients ; x++)
{
cout << "Please enter the name of the patient No." << x+1 << " : ";
getline(cin,workDayQueue[x]);
}
cout << "\n\nPATIENTS WAITING IN THE QUEUE" << endl;
cout << "-------------------------------" << endl;
for (int x = 0 ; x < noOfPatients ; x++)
{
cout << "No: " << x+1 << " " << workDayQueue[x] << endl;
}
cout << "\nThis is the memory address of the first element of the array " << &workDayQueue[0] << endl;
cout << "This is the value stored on the array variable " << workDayQueue << endl;
return 0;
}