terminology(术语)
1.declaration:告诉编译器某个标识符的name和type,同时略去具体细节。
extern int x; //对象(object)声明式
std::size_t numDigits( int number);//函数(function)声明式
class Widget; //class 声明式
template <template T> ; //模板(template) 声明式
class GraphNode;
NOTE:
1.这里作者把X称之为对象,不局限user-defined type variable。跟自己的想法还是一样的。毕竟都暂用内存空间,只不过内置的相对简单而已。
2.函数签名( signature),也就是函数参数和返回类型。比如numDigits 的 签名是std::size_t (int)。类似推之,array是不是也有签名呢?比如:int * a[]
2.definition:提供编译器一些声明式所遗漏的细节。
对象:编译器为该对象拨发内存的地点。
function/function template :提供code body
class/class template :list all members
3.initialize:给予初始值的过程。
对于 user-define type variable :初始化由构造函数执行。
default 构造函数:一个可被调用而不带任何实参者。如果不带实参,要么本来就没有参数,要么有参数但没有传递,其实所有的参数都有default缺省值。
explicit/implicit声明构造函数:这个知识点不知道????,回头查阅。
但建议explicit 声明构造函数。
class c {
public:
explicit c (int x);
}
4.构造函数的复制(copy构造和copy赋值)
copy 构造函数被用来“以同类型对象初始化自我对象”
copy assignment操作符被用来“从另一个同类型对象中拷贝其值到自我对象”
自我理解:1.都是取同类型对象的值 赋值给 该对象。
2.copy是初始化,copy assignment 是拷贝。这个才是重点。初始化一定是在声明时,有构造函数被调用来初始化。反之,在没有新对象被定义
还要改变对象的值,必须要assginment。
5.pass-by-value & pass-by-reference-to-const
bool hasAcceptableQuality(Widget w);
...
Widget aWidget;
if(hasAcceptalbeQuality(aWidget))....
pass-by-value 意味 调用copy构造函数。传递一个副体给函数形参w.这个不是一个好方法,一般用pass-by-reference-to-const。
6.STL(standard template library) 这个貌似不懂,或许自己忘了!!!
7.undefined behavior .
一般都是null pointer 以及数组越界问题。
8.client(客户)
使用者,比如接口interface,可以是人可以是函数。。。。一个主动者。自己也可以是自己的client,如果自己用自己的code.
9.naming conventions
widget : 泛指一个普通的class。
rhs: right-hand side
lhs: left-hand side
pt: pointet to T //指向一个T型对象
rw: reference to widget//widget *pw;
ra:reference to airplane
mf: member function //类的成员函数
10.threading consideration
略
11.TR1 & boot
觉得不重要,略。
terminology(术语)的更多相关文章
- kafka术语
kafka 架构Terminology(术语) broker(代理) Kafka集群包含一个或多个服务器,这种服务器被称为broker Topic 每条发布到Kafka集群的消息都有一个类别,这个类 ...
- asynchronous vs non-blocking
http://stackoverflow.com/questions/2625493/asynchronous-vs-non-blocking In many circumstances they a ...
- The Automated Testing Handbook 自动化测试手册简介
Learn what works, what doesn't and why. The Automated Testing Handbook is a practical blueprint for ...
- maintenance
Maintenance Primitives Operator经常需要在包含Mesos集群的机器上执行维护任务. 大多数Mesos升级可以在不影响运行的任务的情况下完成,但是有些情况下维护可能会影响正 ...
- 【Coursera】Security Introduction -Eighth Week(2)
Review -Terminology(术语): Confidentiallity & Integrity 泄密 & 欺骗 Confidentiallity: Prevent unau ...
- 【Coursera】Security Introduction -Eighth Week(1)
Security Introduction People With Bad Intent 今天,Bob 向 Alice 发送了一条 "Hello,Allice!" 的信息,他们希望 ...
- Multithreading in C
Multithreading in C, POSIX(可移植操作系统接口Portable Operating System Interface X ) style Multithreading - A ...
- Course Machine Learning Note
Machine Learning Note Introduction Introduction What is Machine Learning? Two definitions of Machine ...
- words2
餐具:coffee pot 咖啡壶coffee cup 咖啡杯paper towel 纸巾napkin 餐巾table cloth 桌布tea -pot 茶壶tea set 茶具tea tray 茶盘 ...
随机推荐
- js对象注册清除
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>& ...
- pip查看安装包的可安装版本
不需要下载或者安装任何其他软件包,你可以指定一个高得离谱的版本号( 不可能有实际安装候选),并且可用的版本将被打印: pip install scrapy==122222 得到信息后指定版本就好了 p ...
- The 17th Zhejiang University Programming Contest Sponsored by TuSimple A
Marjar Cola Time Limit: 1 Second Memory Limit: 65536 KB Marjar Cola is on sale now! In order to ...
- Educational Codeforces Round 18 B
Description n children are standing in a circle and playing the counting-out game. Children are numb ...
- POM报错Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from
解决方式一: 1.查看.m2\repository\org\apache\maven\plugins\maven-resources-plugin\下maven-resources-plugin- ...
- .net core跨域设置
services.AddCors(options => options.AddPolicy("AllowSameDomain", builder => builder. ...
- P1179 数字统计
题目描述 请统计某个给定范围[L, R]的所有整数中,数字 2 出现的次数. 比如给定范围[2, 22],数字 2 在数 2 中出现了 1 次,在数 12 中出现 1 次,在数 20 中出 现 1 次 ...
- vue_resource 使用说明
前几天用vue-resource调用接口,用post方式给后端,发现后端php接受不到数据,这好奇怪,最后发现提交给后端的时候 需要加一个参数 就是:emulateJSON : true 这句话的意思 ...
- 开发原生安卓cordova插件(有原生界面)
上文开发的插件没有调用原生界面,本文介绍开发带有activity的插件 本文很多操作与上文重复,重复部分会省略 首先打开plug1,先开发插件的原生代码 在以下命名空间创建一个activity 名称为 ...
- 一段字符串中间提取json字符串
项目过程中经常打日志:LOG.error("[failure][CreateOrder] param:{}", JSON.toJSONString(userCreateOrderD ...