Line 2: You haven't shown the definition of Ailment. Presumably, it is a class.
Line 63: You're trying to do a push_back() of a std::string to a LinkedList of Ailments (whatever that is).
Line 63: You're doing a push_back() to an unnamed object. Line 63 goes out of scope at line 67. Line 63 should be:
1 2
|
Ailment temp(ailment); // Create temporary object from user input
ailments_.push_back(temp);
|
Line 34,97: EXIT_SUCCESSS expands to the value 0. It does NOT call exit().
Lines 42-68: You should consider placing this code in it's own function. By the time you flush out the code in the switch statement, it's going to get unwieldly.
Line 34,97: You should avoid calling exit(). exit() does not clean up in the same way that a simple
return 0;
does.
edit: regarding Ailment: Sorry. Had not seen your enqueue/dequeue thread.
However, you should still post all relevant classes for your question.
edit #2: Regarding line 63. I just saw the
static
on your push_back() function. You don't want to do this. This will operate as if you have only one linked list of ailments. That may be true for the moment, but as Jonin pointed in the enqueue/dequeue thread, you might want want a linked list of ailments per patient.