作者deathcustom (暖風環繞著我)
看板NTUEE107HW
標題Re: 關於pointer
時間Mon Dec 8 13:22:53 2003
※ 引述《erastone (編號002852six)》之銘言:
: class count {
: ........}
: count *counterptr = &counter;
: 和
: count *counterptr = counter;
: 是差在哪?
counter是一個變數是吧
那第一個就表示
*counterptr = = counter的值
counterptr = = counter的位址
第二個......沒有這樣寫的啦=.=
--
不知道有沒有錯
好久沒弄快忘光光了><
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.166.84.125
※ 編輯: deathcustom 來自: 218.166.84.125 (12/08 13:31)
※ 編輯: deathcustom 來自: 218.166.84.125 (12/08 13:32)
→ aknow:2nd counter可以是一個pointer 推 140.112.18.107 12/08
→ santana111:是學長就推一下吧 推140.112.239.237 12/08
→ needhope:好像一個是alias 另一個是address 推 163.23.225.106 12/10