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 tips on how to ask a good question run !howto ask.
5 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 tips on how to ask a good question run !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:
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:
You don't use inheritance to express a "has-a" relationship in C++, you use members instead.
The default copy constructor copies all the members. Sometimes this is incorrect because you have pointers to something and you need a deep copy. Sometimes you have brick types like std::mutex you can't meaningfully copy at all. It just depends on what makes sense in context.
Since we don't have context we can't really suggest anything specific.