随笔分类 -  Thinking in C++

摘要:1 There are certain rules when using references: (Page 451)A reference must be initialized when it is created. (Pointers can be initialized at any ... 阅读全文
posted @ 2014-06-24 09:36 ruccsbingo 阅读(253) 评论(0) 推荐(0)
摘要:static: (Page 406)In both C and C++ the keyword static has two basic meanings, which unfortunately often step on each other's toes.1 Allocated ... 阅读全文
posted @ 2014-05-26 21:42 ruccsbingo 阅读(162) 评论(0) 推荐(0)
摘要:Problems: (Page 372)There are two problems with the use of proprocessor macros in C++. The first is also with C: a macro looks like a function ca... 阅读全文
posted @ 2014-05-26 17:12 ruccsbingo 阅读(217) 评论(0) 推荐(0)
摘要:The first motivation for constseems to have been to eliminate the use of preprocessor #definefor value substitution. It has since been put to use for ... 阅读全文
posted @ 2014-05-07 15:50 ruccsbingo 阅读(184) 评论(0) 推荐(0)
摘要:Why need initialization and cleanup?A large segment of C bugs occur when the programmer forgets to initialize or clean up a variable.The class designe... 阅读全文
posted @ 2014-05-07 14:39 ruccsbingo 阅读(189) 评论(0) 推荐(0)
摘要:The variables are guaranteed to be laid out contiguously, as in C. However, the access blocks may not appear in the object in the order that you decla... 阅读全文
posted @ 2014-04-30 20:09 ruccsbingo 阅读(150) 评论(0) 推荐(0)
摘要:What is an object? (Page 238)In C++, an object is just a variable, and the purest definition is "a region of storage" (this is a more specific way ... 阅读全文
posted @ 2014-04-30 19:40 ruccsbingo 阅读(183) 评论(0) 推荐(0)
摘要: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 functi... 阅读全文
posted @ 2014-04-22 17:12 ruccsbingo 阅读(270) 评论(0) 推荐(0)
摘要:1 Declarations VS definitions (Page 81) declarations: This function or variable exists somewhere, and here is what it should look like. definitions:... 阅读全文
posted @ 2014-04-22 10:55 ruccsbingo 阅读(141) 评论(0) 推荐(0)