Please help me putting a single statement in bool full() & bool empty()
Code:bool isFull() { return (Count() == 5) == true; } //is it wrong? please correct it
Please help me putting a single statement in bool full() & bool empty()
Code:bool isFull() { return (Count() == 5) == true; } //is it wrong? please correct it
Just return Count() == 5.
Ok thanks , by the way can you help me how to do a circular count! , not depending on the counter from enqueue and dequeue?
Code:int Count() { return size; }
in my enqueue I put size++ & dequeue I put size-- , but I want to put those two in one function
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"