What's all the fuss about C++ copy constructors? [duplicate]
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: When do we have to use copy constructors? Why exactly are C++ copy constructors so important? I just learned about them and I don't quite see what is the fuss about them. It seems you should always write a copy constructor for your classes if you use pointers, but why? Thanks, Boda Cydo. 回答1: Copy constructors and assignment operators are very important in C++ because the language has "copy semantics", that is