DOES THIS MAKE SENSE?

Hi everyone, As a school assignment, I've been asked to implement the following member function of the QueueType class.
1
2
template<class Type>
void QueueType<Type>::removeFirst(QueueType<Type>& Q, const Type& x)
-This function is basically suppose to remove the first occurrance of "x" in the queue without affecting the order of the other elements in the queue. My problem though, is that this function has a QueueType object as its parameter and for life of me, I can't figure out what for.

Because this function can only be called by a QueueType object than why does it also have a QueueType object as its parameter?

That is a very good question. It doesn't make sense to me either. I'd ask your teacher.
Last edited on
closed account (zb0S216C)
Perhaps he wanted you to use it for swapping the two queues? Or maybe it's an error on his part? I guess this only strengthens the use of comments.

Wazzak
Topic archived. No new replies allowed.