The connection refers to the process of a computer program itself associated with each other. Different from the coupling phase, it can be divided into two different coupon methods: static connection and dynamic cable. Static connection static linkage means that the combination work appears in the compilation connection phase, which is also known as early aspects because this connection process is completed before the program started. This kind of wedding performed at compile time is also known as static beam. When compiling, the operation call in the program and the relationship between the execution of the operation code are resolved, and this relationship is determined, but it is also called beam, becomes becomes static to the static beam. Let's take a static connection example. #include class point {public: Point (double i, double j) {x = i; y = j;} double area () const {return 0.0;} private: double x, y;}; Class Rectangle: public point { Public: Rectangle (Double I, Double J, Double K, Double L); Double Area () Const {Return W *H;} Private: Double W, H;}; Rectangle :: Rectangle (Double i, Double J, Double K, Double L): Point (i, j) {w = k; h = L;} void fun (point & s) {cout <} void main () {Rectangle Rec (3.0, 5.2, 15.0, 25.0); FUN (REC);} The operation result of the program is: 0 The output result indicates that the area () operation executed by the objects cited in the FUN () function is associated with the implementation code of the Point :: Area (). This is because of the results of static connection. In the program compilation phase, the AREA () operation executed by the object referenced to S can only be bundled on the function of the POINT class. Therefore, the program outputs the resulting result. Because we expect that the area () operations performed by the S-reference object should be bundled on the area () function of the Rectangl class. This is the static connection. Dynamic cable From the above analysis of the static connection, the compiler does not know the function to be called in the compilation phase, and only the function to be called only when the program is executed, and it is exactive to the call to this call. , Ask the connection to work to work during operation, such co-consoulation work is called dynamic cable, or called dynamic becomes, and is called late. Dynamic built is actually dynamically identified. In the above example, when the static connection is analyzed, the object referenced in the FUN () function is bundled on the Point class. Dynamic cableting at runtime will put the S object reference beam to the Rectangle class. It can be seen that the same object is referenced to the class object being bundled at different phases. So how do you determine whether it is static and dynamic? C specified dynamic cables are implemented under the support of virtual functions. From the above analysis, it can be seen that static linkages and dynamic cables are also polymorphic, and they are different options for different stages. In the above example, it is achieved a choice of polymorphism of FUN () function parameters. The parameter of this function is a class of object references, static linkages and dynamic cables and dynamic keratochement actually selecting its static type and dynamic type. The connection is the choice of polymorphism of this reference.