
C++ Primer
ProfessionalEngineer
这个作者很懒,什么都没留下…
展开
-
Chapter 2 Variables and Basic Types
2.3 -- VariablesC++ programs typically are composed of many files. In order for multiple files to access the same variable, C++ distinguishes between declarations and definitions.A definition原创 2012-07-25 15:09:24 · 685 阅读 · 0 评论 -
Chapter 9 Sequential Containers
Sequential Containersvector Supports fast random accesslist Supports fast insertion/deletiondeque Double-ended queueSequential Container Adaptorsstack Last in/Fir原创 2012-08-23 19:42:42 · 840 阅读 · 0 评论 -
Chapter 5 Expressions
5.11 -- The new and delete ExpressionsWhen we writedelete p;p becomes undefined. Although p is undefined, on many machines,p still contains the address of the object to which it pointed. H原创 2012-07-21 07:15:30 · 564 阅读 · 0 评论 -
Chapter 7 Functions
7.2 -- Argument PassingNote:When the only reason to make a parameter a reference is to avoid copying the argument, the parameter should beconst reference.It should be obvious that a functi原创 2012-07-25 16:16:12 · 674 阅读 · 0 评论 -
Chapter 13 Copy Control
13.1 -- The Copy ConstructorThe constructor that takes a single parameter that is a (usuallyconst) reference to an object of the class type itself is called the copy constructor. Like the defaul原创 2012-07-03 08:50:05 · 768 阅读 · 0 评论 -
Chapter 12 Classes
12.4 -- ConstructorsIf a class defines even one constructor, then the compiler will not generate the default constructor.The synthesized default constructor initializes members using the s原创 2012-07-02 16:00:01 · 582 阅读 · 0 评论 -
Chapter 4 Arrays and Pointers
4.3 -- C-Style Character StringsWhen we allocate memory, we must eventually free it. Otherwise, memory is gradually used up and may be exhausted. When we no longer need the array, we mustexplici原创 2012-08-29 20:48:22 · 941 阅读 · 0 评论 -
Chapter 16 Templates and Generic Programming
Generic programming involves writing code in a way that is independent of any particular type.Templates are the foundation of generic programming.Generic programming lets us write classes and function原创 2012-07-19 09:10:13 · 899 阅读 · 0 评论 -
Chapter 15 Object-Oriented Programming
Object-oriented programming is based on three fundamental concepts:data abstraction, inheritance, and dynamic binding. In C++ we use classes for data abstraction and class derivation to inherit one cl原创 2012-07-03 10:44:01 · 943 阅读 · 0 评论