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,387评论 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