close

Pass by Value, Pass by Address, Pass by Reference

好文分享

http://wp.mlab.tw/?p=176

超簡單總結: 

Pass by address 其實是用到pointer 的 Pass by Value, 只是傳指標的值, 所以才叫address

Pass by Reference 是C++才有的, Reference 等於是原變數的別名

 

arrow
arrow
    文章標籤
    C&CPP
    全站熱搜
    創作者介紹
    創作者 紅線 的頭像
    紅線

    紅線的生存日誌

    紅線 發表在 痞客邦 留言(0) 人氣()