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. delphi 18 屏蔽和替换 右键菜单

    //屏蔽右键菜单procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;  var Handled: Boolean);begin  wi ...

  2. Android自己定义DataTimePicker(日期选择器)

    Android自己定义DataTimePicker(日期选择器)  笔者有一段时间没有发表关于Android的文章了,关于Android自己定义组件笔者有好几篇想跟大家分享的,后期会记录在博客中.本篇 ...

  3. ZOJ1109_Language of FatMouse(STL/map)

    解题报告 题意: 略. 思路: map应用. #include <algorithm> #include <iostream> #include <cstring> ...

  4. js判断图片是否显示

    function getDefaultImg() { //添加判断图片是否存在操作 var $defaultImgPathObj = $('input[name=defaultImgPath]'); ...

  5. 简简单单安装debian桌面工作环境

    linux一般给人的影响是对使用者的要求偏高, 使用者需要自行配置很多相应的系统工作参数,因此,从一定的程度上阻碍了用户去使用它.而本文所介绍的是, 使用者完全可以消除这个障碍,非常简单地安装好自己的 ...

  6. selenium python 环境搭建

    说真的关于这个网上有太多的文章了,不想在这上面浪费过多的精神,简单说一下: 1.下载python(我的2.7) 2.下载python的基础工具包(setuptools) 3.下载python的安装包管 ...

  7. Java基础知识强化101:Java 中的 String对象真的不可变吗 ?

    1. 什么是不可变对象?       众所周知, 在Java中, String类是不可变的.那么到底什么是不可变的对象呢? 可以这样认为:如果一个对象,在它创建完成之后,不能再改变它的状态,那么这个对 ...

  8. ceph运维命令合集

    一.集群 1.启动一个ceph进程 启动mon进程 [root@ceph-adm ~]#203.109 service ceph start mon.ceph-mon1 启动msd进程 [root@c ...

  9. 给jdk写注释系列之jdk1.6容器(12)-PriorityQueue源码解析

    PriorityQueue是一种什么样的容器呢?看过前面的几个jdk容器分析的话,看到Queue这个单词你一定会,哦~这是一种队列.是的,PriorityQueue是一种队列,但是它又是一种什么样的队 ...

  10. mysql导入数据load data infile用法

    mysql导入数据load data infile用法 基本语法: load data [low_priority] [local] infile 'file_name txt' [replace | ...