+ 1
Queue Management - Part 2 - C++
I've the solved the "Queue Management - Part 2" using the below code. Can anyone suggest any better approach? Queue operator +(Queue &secondQueue) { for(int i = 0; i < secondQueue.size; i++) this->add(secondQueue.queue[i]); return *this; }
1 ответ
+ 1
Really is bo better approach. You could make your queue iterative by implementing a begin and end function and use a for each loop, but that can get quite complicated as you have to implement iterators.