QUEUES (problem in output

Please tell me why I am getting an error .

Hello @G_rahil,

You are getting compilation error:
source.cpp:48:9: error: ‘isEmpty’ was not declared in this scope
48 | while(!isEmpty()){
Reason:
You cannot access the class members directly outside the class.
Solution:
q.isEmpty()

Hope, this would help.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.