C
C#4mo ago
Coolbeans

Priority queue, queue empty error.

Hi, I am getting an error when trying to use the peek method that says that the queue is empty. However just before this I use the enqueue method to put something into it. Why is this error occurring?
No description
2 Replies
Buddy
Buddy4mo ago
I suggest to put breakpoints at the line of exception AND on the while-loop Then check the queue
Coolbeans
CoolbeansOP4mo ago
Thank you!! I have just checked and I think its being dequeued somewhere without putting anything back in which it shouldn't be doing.
Want results from more Discord servers?
Add your server