Link to home
Start Free TrialLog in
Avatar of jnejdecce
jnejdecce

asked on

queue

Can you please show me a simple example of a integer function that returns the number of items in a queue.
Avatar of Triskelion
Triskelion
Flag of United States of America image

Is your queue an array of integers (characters, objects)?
How do you detect the number of items?
Is ZERO a number?
Avatar of AssafLavie
AssafLavie

std::queue q;
...
return q.size();
ASKER CERTIFIED SOLUTION
Avatar of AssafLavie
AssafLavie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've been living in C too long.
I didn't even think of that.
Duh on ME!
Dear jnejdecce

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "AssafLavie"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: https://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
Force accepted

** Mindphaser - Community Support Moderator **