Hi guys I'm having trouble finding the bug in my code for project 6 C++ .CAN ANYONE PLEASE HELP ME
#include <iostream> using namespace std; class Queue{ int size; int x = 0; int *queue; public: Queue( ){ size = 0; queue = new int[100]; } Queue operator+(Queue &q1){ Queue q2; q2.queue = this -> queue + q1.queue; return q2; } void remove( ){ if(size == 0){ cout<<"Queue is empty"<<endl; } else{ for(int i = 0; i < size - 1;i++){ queue[i]=queue[i + 1]; } size--; } } void print ( ){ if(size == 0){ cout<<"Queue is empty "<<endl; } else{ for(int i = 0; i < size ; i++){ cout<<queue[i]<<" <- "; } cout<<endl; } } void add(int customerID){ queue[size]= customerID; size++; } }; int main( ){ Queue q1; q1.add(42);q1.add(2);q1.add(8);q1.add(1); Queue q2; q2.add(3);q2.add(66);q2.add(128);q2.add(5); Queue q3 = q1 + q2; q3.print(); return 0; }