我是Qt的一個大人物,並提到隱式和顯式共享的一些教程,並且我在後面的文章中遇到過。需要一些關於Qt :: operator的解釋
http://cdumez.blogspot.com/2011/03/implicit-explicit-data-sharing-with-qt.html
代碼段我無法瞭解以下操作
Contact& Contact::operator=(const Contact& other) {
d = other.d;
return *this;
}
的功能,如果有一個人能解釋這究竟這樣做,爲什麼它會出現在代碼這將是一個很大的幫助。
謝謝你們。
〜Tharanga
感謝您的答覆 – Tharanga 2011-04-20 10:21:10