討論串請教C++的this
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者tinlans.時間18年前 (2006/11/03 04:32), 編輯資訊
0
0
1
內容預覽:
引述《quota@kkcity.com.tw (我要出清)》之銘言:. > #include <iostream>. > #include <cstdlib>. > using namespace std;. > class work. > {. > public:. > int Id;. >
(還有1202個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者xsion (Xsion)時間18年前 (2006/11/03 01:12), 編輯資訊
0
0
0
內容預覽:
引述《quota@kkcity.com.tw (我要出清)》之銘言:在c / c++中取得指標成員使用-> , 取得物件成員用.物件前面加&可取得指標,指標前面加*可取得物件。. 總之this->Id 與(*this).Id都是取得你目前該class物件的成員Id啊。. c語言沒有真正的字串型別

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者quota.時間18年前 (2006/11/02 21:32), 編輯資訊
0
0
1
內容預覽:
#include <iostream>. #include <cstdlib>. using namespace std;. class work. {. public:. int Id;. char name[20];. work() {. Id = 0;. strcpy(name, "ZZZ")
(還有474個字)
首頁
上一頁
1
下一頁
尾頁