I've been playing around with dynamic allocation and queue recently. Keep in mind that I am fairly new to data structures and I’ve been teaching myself by watching YouTube tutorials and reading some tutorials from websites so forgive my ignorance if I don’t know every single thing there is to know about this subject. However, while playing around with the implementation of an assignment operator for my queue, I seem to have made a mistake somewhere in its code. You see whenever I try and use the assignment operator
Queue names2;
names2 = names;
the assignment operator copies everything already in the queue except the empty elements of the array. Am I implementing my copy constructor or my assignment operator wrong that is causing it to not add the empty unused capacity to the newly created queue?