Question
Overload the operator+() to implement concatenation of two lists. This operator should take a const reference to another ListType as its parameter for input. This
Overload the operator+() to implement concatenation of two lists. This operator should take a const reference to another ListType as its parameter for input. This is the list on the right hand side of the + operation. This function should return a reference to a new ListType as its result. It is important that both the input parameter and the return type be both reference parameters for this function. This function should be a const function, as it does not cause the original list to change. Instead you should dynamically allocate a new ListType in this function, fill it with the items from the two lists being concatenated, and then return it as the result from this overloaded function.
Written in C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started