6.7 Introduction to pointers

原完整教程鏈接:6.7 Introduction to pointers

1.
// Best practice: When declaring a pointer variable, put the asterisk 
// next to the variable name.

2.
// Best practice: When declaring a function, put the asterisk of a 
// pointer return value next to the type.

3.
/*
   The size of a pointer is dependent upon the architecture the 
   executable is compiled for -- a 32-bit executable uses 32-bit 
   memory addresses -- consequently, a pointer on a 32-bit machine 
   is 32 bits (4 bytes). With a 64-bit executable, a pointer would be 
   64 bits (8 bytes). Note that this is true regardless of what is being 
   pointed to.
*/

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容

  • Android 自定義View的各種姿勢1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 173,316評論 25 708
  • 背景 一年多以前我在知乎上答了有關LeetCode的問題, 分享了一些自己做題目的經驗。 張土汪:刷leetcod...
    土汪閱讀 12,771評論 0 33
  • 原完整教程鏈接:6.15 An introduction to std::array In previous le...
    Closears閱讀 505評論 0 0
  • 耳機線纏在一起很久都解不開 修了好久的圖差最后一步沒保存軟件閃退了 王者榮耀對方就差一絲殘血還能把你反殺 易拉罐的...
    ae142234e286閱讀 138評論 0 0
  • 暖陽斜照映新芽,又見沿街賣祭花; 仿現爐臺忙碌影,天國莫再顧全家。
    偲瞳閱讀 117評論 0 0