#Unable to overload operator+ without getting errors
11 messages · Page 1 of 1 (latest)
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.
!howto ask
Anyone can ask a question in our programming channels. Following the guide Writing The Perfect Question is recommended.
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
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!
your copy/move semantics are wrong
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
yep I would've loved to use vectors here I am finishing someone else's work
Thanks
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.