0

c++ oop

how do i add two array of object with operator overloading so that i can output all the element Example: a3 = a1 + a2;

12th Mar 2021, 9:42 AM
BLAKE ANTA
BLAKE ANTA - avatar
1 Respuesta
+ 2
I'm not sure I understand what you are trying to achieve. Do you want to concatenate two arrays via an overloaded + operator? Why not just use std::vector? With plain arrays, passing the size would be problematic. Or are the arrays property of the object and you want to create a new object with the arrays merged together? It would be helpful if you could give some more information in this regards, maybe post a sample code; the example doesn't really convey a lot. Is the question perhaps related to the Queue Management Part 2 project from the C++ course?
12th Mar 2021, 9:56 AM
Shadow
Shadow - avatar