Saturday, 1 December 2012

Week 9 _unsigned int size()

unsigned int Queue::size() {
    unsigned int size=0;
    Node* n = _head;
    if(!isEmpty()){
        size =1;
        while(n!=_tail) {
            size++;
            n = n->_next;
        }
    }
    return size;
}

No comments:

Post a Comment