Commit 20cb8c67 authored by Dang Quang Tran's avatar Dang Quang Tran
Browse files

Last Commit ?

parent 57a1815c
......@@ -6,7 +6,7 @@
#include<random>
constexpr int MAX_NUMBER_OF_NAMES =50;
constexpr int NUMBER_OF_DIAGNOSEN =4;
using namespace std;
const array<std::string, MAX_NUMBER_OF_NAMES> firstNames_male = {
"Tanguy",
......@@ -172,7 +172,7 @@ const array<string, 2> genderAsString{
enum Diagnose {
simulant, infection, fracture, cured
};
const array<string, 4> diagosisAsString = {
const array<string, NUMBER_OF_DIAGNOSEN> diagosisAsString = {
"simulant", "infection", "fracture" , "cured"
};
......@@ -214,7 +214,7 @@ public:
void resettDiagnose(Diagnose diagnose);
void randomize_dignose();
static int getStaticIDnumber();
int getID();
......
......@@ -41,9 +41,9 @@ void Hospital::print_Patient_list(){
}
}
void Hospital::deleteHPatient(int index_of_Patient){
void Hospital::deleteHPatient(int ID_of_Patient){
for(size_t i = 0; i < patientsList.size() ; i++){
if(patientsList.at(i).getID() == index_of_Patient ){
if(patientsList.at(i).getID() == ID_of_Patient ){
patientsList.erase(patientsList.begin() + i);
break;
}
......
......@@ -17,7 +17,7 @@ public:
void print_Patient_list();
void deleteHPatient(int index_of_Patient);
void deleteHPatient(int ID_of_Patient);
void deleteCuredPatients();
......
......@@ -14,7 +14,7 @@ int main()
srand(time(NULL));
Hospital HospitalDA(60);
for(int number_of_beds = 0; number_of_beds < 61; number_of_beds++){
for(int number_of_beds = 0; number_of_beds < HospitalDA.getNumberBets(); number_of_beds++){
HospitalDA.newPatient(genRandPatient());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment