I've been working on some project and I got to wondering when you know you need to use a copy constructor and an assignment operator. Is there a rule of thumb? I know there is the Rule of Three, but is there something that tells you when you need those three?
"is there something that tells you when you need those three?"
Nope. Whether or not you need to enforce the Rule of Three depends on your class' design. Typically, when your class contains a pointer or reference of some sort, then it's likely that you will need to incorporate the Rule of Three. However, the Rule of Three doesn't apply to just pointers or references, but possibly other class types such as "std::fstream".