Tuesday 12 March 2013

Queue Add


void Queue::add(int data){
  Node* last = _head;
  while (last->_next) {
    last = last->_next;
  }
  Node* to_add = new Node(data);
  last->_next = to_add;
}

Probably work, probably not

No comments:

Post a Comment