
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->
随机推荐
-
[原创]经历:asp.net oracle 部署问题以及解决方法
精简的美丽...... 一.环境 开发环境 win7 64bit Vs2010 Oracle 11g r2 64bit <inst ...
-
jgroup 概述--官方文档
原文地址:http://www.jgroups.org/manual/html/ch01.html# Chapter 1. Overview 1.1. Channel 1.2. Building Bl ...
-
使用C#通过Thrift访问HBase
前言 因为项目需要要为客户程序提供C#.Net的HBase访问接口,而HBase并没有提供原生的.Net客户端接口,可以通过启动HBase的Thrift服务来提供多语言支持. Thrift介绍 环境 ...
-
Helpers\Hooks
Helpers\Hooks Add modules with hooks The hooks helper allows modules to be created within the module ...
-
__attribute__机制介绍
转载:http://blog.csdn.net/ithomer/article/details/6566739 1. __attribute__ GNU C的一大特色(却不被初学者所知)就是__att ...
-
Linux下的lds链接脚本简介
转载:http://hubingforever.blog.163.com/blog/static/171040579201192472552886/ 一. 概论 每一个链接过程都由链接脚本(lin ...
-
琐碎-hadoop2.2.0目录结构
之前了解了一下0.20.2和1.1.0.以后现在主流肯定是2.x吧,包含了之前没有的yarn bin Hadoop最基本的管理脚本和使用脚本,这些脚本是sbin目录下管理脚本的基础实现,用户可以用这些 ...
-
BootStrap2学习日记11---单选框多选框
单选框代码: <label for="country">国家</label> <select id="country"> & ...
-
cocos2d-x混合BlendFunc的使用
1.什么是混合模式 “混合”是指两种颜色的叠加方式.在新图片将要渲染画到屏幕上的时候,将用在新图片中的红.绿.蓝和透明度信息,与屏幕上已经存在的图片颜色信息相融合. 说的具体一点,就是把某一像素位置上 ...
-
C#中登录验证FormsAuthentication
1:前台编写一个登录界面,这里为了简化,只有用户名和密码 代码如下: <form method="post" action="/User/CheckLogin&qu ...