Okay here is the weird part. The code in red is the one that seems to give me those problems. I figured it out by commenting it out and when it was commented out it would print out the answer. But when I leave it in I get an error message mentioned above. I don't understand why though! What is wrong with:
patient.setPatientNumber(i);
this code? Or could it be something wrong with my Patient class?? Help please! Thanks! By the way "PQueue <Patient> PQ;" is just setting up a priority queue. The class for the priority queue has been written by my prof already and works fine. Also please feel free to give me suggestions on how to improve my patient class, such as my constructor and also other things I could add, I do not know really how to use the const keyword so feel free to tell me where to add it. Thank u.
Question
destined_1ne
Hi. I get an error when running my program. It says:
Then aother window pops up and says:
What does all this mean??
I will post my program:
Okay here is the weird part. The code in red is the one that seems to give me those problems. I figured it out by commenting it out and when it was commented out it would print out the answer. But when I leave it in I get an error message mentioned above. I don't understand why though! What is wrong with:
this code? Or could it be something wrong with my Patient class?? Help please! Thanks! By the way "PQueue <Patient> PQ;" is just setting up a priority queue. The class for the priority queue has been written by my prof already and works fine. Also please feel free to give me suggestions on how to improve my patient class, such as my constructor and also other things I could add, I do not know really how to use the const keyword so feel free to tell me where to add it. Thank u.
Link to comment
Share on other sites
10 answers to this question
Recommended Posts