0
I have a problem that "queue management part3"my code is correct but output is "time out: the monitor dumped ur code"wttodonow
3 Antworten
+ 1
Can you post the relevant parts of the code so we can take a look?
+ 1
Thank you
0
It shouldn't loop forever. The limit is size, just like the original loop in the queue class that you should copy and modify this from.
//your code goes here
class Queue2: public Queue {
public:
void print() {
if (size == 0) {
cout << "Queue is empty"<<endl;
return;
}
for (int i = 0; i < size; i++)
cout<<queue[i]<<endl;
}
};