Home > Back-end > If you need to write a calculated two want to the same type of object function of the "distance
If you need to write a calculated two want to the same type of object function of the "distance
Time:09-23
Who turn to for help: if you need to write a calculated two want to objects of the same type of "distance" letter Number, the two objects can have dozens of types, what did you do?
CodePudding user response:
Each type defines its own distance calculation method, then write a template function, thus to unify the ah,