2.4 What is right and wrong?
[Limitation of the C library]
Name Space Problem, Because of the same name space, different libraries must use different global variables, function names. This is difficult to coordinate.
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
2.5 Basic object
[Solution of the namespace problem]
The new :: operator solves the problem with the namespace sharing, is the namespaces have hierarchy and scope. Different modules have their own independent namespace
〖Personal understanding〗
The structure is that all members are PUBLIC classes, this is the case in the definition of the interface interface of the COM, as this can reduce the misunderstanding of the public storage type keyword. And for the structure is particularly meaningful to construct and destructive functions Because we know that some linked lists need to be released while the nesting level is complex, it is necessary to handle it. Now it is simple, you will automatically trigger the internal destructor. The VC BoundScheck has proven to be a thread safe.
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
2.6 What is an object?
[Structure]. The structure is aggregation of the data, bundles the data together, only [C structure to the evolution of the object]
. Structure is enhanced to an object that can describe attributes and describe behavior. Objects are independent constraints, have their own memory and activities.
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ 2.7 Abstract data type
[Package]
To bundle the data together, allow you to create a new type. Package allows data and its own operation package to form your own attributes and behavior. Abstract data types Abstract us from the problem space to the solution space. C For The type of abstract data type is as strict as the built-in type check. The method of calling the object is called "send a message to the object"
〖Personal understanding〗
"Object Drive" is sometimes referred to as "event driver" or "message driver". This turns an object application from a closed loop from the past process into a dynamic system that is static and uncontrollable.
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~
2.8 Object Details
[Structure dispute]
Traditional C is a low-level language facing process and efficiency. The structure is consistent with the structural code compiled by C / C , ensuring its efficiency. The size of the structure is all data member sizes. Compiler sometimes considers additional bundle from efficiency. byte
〖Personal understanding〗
Objects are white to be user-defined data structures, which differ from their own properties and behaviors. This is different from the traditional structure. The keyword class and struct are different from a default member public, another default private.