1 unnamed arguments in the argument list of the function definition    (Page 114)

In c++, an argument may be unnamed in the argument list of the function definition. Since it is unnamed , you cannot use it in the function body, of course. Unnamed arguments are allowed to give the programmer a way to "reserve space in the argument list." Whoever uses the function must still call the function with the proper arguments. However, the person creating the function can then use the argument in the future without forcing modification of code that calls the function.

2 numbers of arguments       (Page 114)

2.1 an empty argument list

func():   In C++, it tells the compiler there are exactly zero arguments.

     In C, it means an indeterminate number of arguments.

func(void):  In C and C++, it means an empty argument list.

2.2 a variable argument list

func(...):  you should restrict your use of variable argument lists in C and avoid them in C++.

3 Introduction to the pointers

Each of the elements in the program has a location in storage when the program is running. Even the function occupies storage.

4 Specifying storage allocation    (Page 147)

gloal variables,

local variables,

register variables(avoided),

static variables(it is unavailable outside its definition scope, such as function scope or file scope. And you can define a function's local variable to be static and give it an initial value, the initialization is performed only the first time the function is call, and the data retains its value between function calls),

extern variables,

constants variables(a const must always hava an initialization value, and its value never change),

volatile variables(you will never know when this will change, and prevents the compiler from performing any optimizations based on the stability of that variable),

5 function address    (Page 198)

Once a function is compiled and loaded into the computer to be executed, it occupies a chunk of memory. Thus the funciton has an address.

When you are looking at a complex definition, the best way to attack it is to start in the middle and work your way out. middle->right->left->right->

随机推荐

  1. Asp.Net页面(母版页)加载顺序

    ASP.NET 母版页和内容页中的事件 母版页和内容页都可以包含控件的事件处理程序.对于控件而言,事件是在本地处理的,即内容页中的控件在内容页中引发事件,母版页中的控件在母版页中引发事件.控件事件不会 ...

  2. Android 使用 Gmail 来发送邮件

    Android 使用 Gmail 来发送邮件 1. [代码]SendMail.java package org.apache.android.mail; import android.app.Acti ...

  3. Node.js 的Web server--Fenix

    Fenix 是提供给开发者使用的简单的一个 Web server, 是基于 Node.js 开发. 能够同一时候在上面执行非常多的项目. 最适合前端开发者使用. 能够通过免费的 Node.js 控制台 ...

  4. 利用正则表达式作为string.split seprator

    某字符串 var str = "{1,att,7},{2,break,7},{3,crit,7},{4,combo,7},{5,break,7},{6,hit,7}"; 需要分割成 ...

  5. 使用C#通过Thrift访问HBase

    前言 因为项目需要要为客户程序提供C#.Net的HBase访问接口,而HBase并没有提供原生的.Net客户端接口,可以通过启动HBase的Thrift服务来提供多语言支持. Thrift介绍 环境 ...

  6. const int * pi/int * const pi的区别

    前面有一篇文章:数组名就是常量指针 参考文章:http://blog.pfan.cn/whyhappy/5164.html const int * pi .int const * pi与int *   ...

  7. BootStrap2学习日记10---单选框和复选框

    <label>选择你的性别</label> <label class="radio"> <input type="radio&q ...

  8. iOS之隐藏状态栏

    iOS7中,不仅应用的风格有一定的变化,状态栏变化比较大,我们可以看到UIViewController的状态栏与导航栏基本是一体的.因此UIVIEWCONTROLLER的hide/show状态的方法也 ...

  9. linux-cat/less/more/tail

    都可以查看文件 不同点 cat:全部查看不分屏显示 定位到ccc结尾的那行 [root@besttest tmp]# cat yumyum.log|grep ccc$ aaaaaaaaaaaaaaaa ...

  10. ListView使用自定义适配器的情况下实现适配器的文本和图标控件点击事件执行Activity界面中的方法

    ListView使用的是自定义适配器,列表项的布局文件中含有文本和图标,实现文本区域和图标区域的点击事件. 实现思路:在自定义适配器MyArrayAdapter 类型中自定义接口和接口方法,分别设置文 ...