#Unable to overload operator+ without getting errors

11 messages · Page 1 of 1 (latest)

spark vale
#

I'm trying to merge 2 arrays of type string using overloaded operator+, unfortunately I keep getting this error attached.

digital pilotBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.

spark vale
#

!howto ask

opal spindleBOT
#
How to Ask A Programming Question

Anyone can ask a question in our programming channels. Following the guide Writing The Perfect Question is recommended.

What To Post

State your problem clearly and provide all necessary details:
• the relevant portion of your code, or all of it
• the expected output
• the actual output (or the full error)
🏆 Gold Standard: Minimal Reproducible Example

Where To Post

Provide the relevant code in the message, and format it nicely with a code block*. If it's too much for one message, you can upload it:
Compiler Explorer for most C/C++ snippets
OnlineGDB for interaction, debugging
Do not post screenshots, let alone photos of your screen!

vocal cape
#

the return plus; thing is awkward but if we skip that, when you return newsection you sort of need copy/move to work

#

well I guess you could hope that nrvo kicks in, but either way you still need to fix copy/move semantics

#

arguably the easiest way would have been to use a container instead of a raw pointer for your studentsIDs

spark vale
#

Thanks

digital pilotBOT
#

This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.