《C++编程思想》章节试读

当前位置:首页 > 计算机网络 > > C++编程思想章节试读

出版社:机械工业出版社
出版日期:2002-1-1
ISBN:9787111091622
作者:埃克尔
页数:801页

《C++编程思想》的笔记-zdfg - zdfg

c++的经典书籍
数目对我来说之一

《C++编程思想》的笔记-

传说中C++的经典,期待中。

《C++编程思想》的笔记-14: Inheritance & Composition - 14: Inheritance & Composition

But, and this is an important point, as soon as you decide to write your own copy-constructor and assignment operator, the compiler assumes that you know what you’re doing and does not automatically call the base-class versions, as it does in the synthesized functions. If you want the base class versions called (and you typically do) then you must explicitly call them yourself.既然是用户通常做的事情,为什么不设为默认呢?是考虑到可以在拷贝构造函数中用列表调用构造函数吗?这更不常见吧。还是实现难度问题?好吧正解恐怕是“不带参数"原则。这有些过分了吧,似乎有违”最合常理“(”最少惊讶“似乎是个不太好的翻译)原则。也许是出于安全性的考虑吧。

《C++编程思想》的笔记-第157页 - 4:Data abstraction

Note that the c heap manager is fairly primitive.It gives you chunks of memory and takes them back when you free() them.There's no facility for heap compaction, which compresses the heap to provide bigger free chunks.


 C++编程思想下载 更多精彩书评


 

外国儿童文学,篆刻,百科,生物科学,科普,初中通用,育儿亲子,美容护肤PDF图书下载,。 零度图书网 

零度图书网 @ 2024