|
-
September 13th, 2012, 04:51 PM
#3
Re: Help in Enqueue & Dequeue
 Originally Posted by D_Drmmr
You should **** the **** in the ****ing ****. (In other words, please refrain from using profanity; it's not helpful.)
Did you step through your program in the debugger? That's the first thing any of us would do to find the problem, so you should learn to use the debugger too. It's a mandatory part of learning C++.
The count variable and the empty function don't seem to make much sense here. What does it mean for a patient to be empty?
This is not standard C++. In standard C++, you can only create an array of a fixed size that is known at compile time. The compiler cannot deduce the size of the array here. You need to use a std::vector.
Also, I didn't see you use a std::queue. The way I read the assignment, that's what is asked for.
I've never used a debugger before. I'm pretty sure my program had to be object-oriented but I drifted off of that because I'm not used to it. So whatever class members I made it's just for show. For a patient to be empty, it's saying their wait time is equal 0. Can you show me an example of vectors and queue here?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|