Just 20th, I just bought books, I am obviously open source, and I have to be nearly 60 yuan, black is really! Corning into the topic: Looking at the preamble, probably introducing it, there is a pile of recommendations. Really let me excite too! See C way changing! Bjarne Stroustrup: C is a recognor Purpose Programming Language, Not Just A Object-Oriented Programming Language. Does INTRODUCTION? Do you have anything! Later, the object and class abstraction method are coming to see the problem, all things are objects, and objects are nature, so the objects use abstract classes, which are common to them. Five Principles: 1, all things are objects (so that the procedure can be subsequently divided into group) 2. Objects exchange (function call request) 3, object interlaced (possibilities of more complex programs) 4, all objects have Attributes (possibly possible) 5, all objects of a class can accept the same message (possibly possible) model: class (abstraction) - instance / object (specific) resolve theory and actual combination difficult: Interface Interface (Function) Model:
Object-interface
Object: Features (Data Elements) - Behavior (Features)
programmer
(Class creator) -
Customer users
(Customer programmer) C implementation: Access Specifer Access Configuration Public: Public Interface (External Function Access) Protected: Protection Interface (Accessible in Inherited Class in External Function) PRAVITE: Internal Interface (Internal Function Access)
Heap Stack Dynamic Distribution Speed Slow Slow Virtual Memory Not Follow Details Flexible Stack Heap Static Assignment Speed Fast Quantity Small Memory Follow Details (Function Life) C Implement: Dynamic Assignment New Creating Object Delete Destruction Object [Method] (Skip)