什麼是三法則? - What is The Rule of Three?

問題:

  • What does copying an object mean? 複製對象是什麼意思?
  • What are the copy constructor and the copy assignment operator ? 複製構造函數複製賦值運算符是什麼?
  • When do I need to declare them myself? 我何時須要本身聲明?
  • How can I prevent my objects from being copied? 如何防止對象被複制?

解決方案:

參考一: https://stackoom.com/question/HVVy/什麼是三法則
參考二: https://oldbug.net/q/HVVy/What-is-The-Rule-of-Three
相關文章
相關標籤/搜索