I have a general question i C++ that I coudln't get a clear answer to and I'm hoping I get an answer to it here. As a programmer, do I need to explicitly overload the assignment operator for a class when all instance data fields in this class are standard built in C++ data types.
Asked
Active
Viewed 60 times
2 Answers
0
No. You only need to overload the defaults if you are doing manual resource management. If all of your members can be treated as POD types then you will be fine.

Community
- 1
- 1

NathanOliver
- 171,901
- 28
- 288
- 402