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
Printable View
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 :D , 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