Function pointer-pointer the focus of a function pointer is pointer. Indicates a pointer pointing to a function. Eg: int (* pf) (); the focus of pointer functions is functions. Indicates a function, and its return value is a pointer. Eg: int * fun (); array pointer-pointer array pointer focuses on pointer. Indicates a pointer pointing to an array. Eg: int (* pa) [8]; the focus of the pointer array is the array. Indicates an array, which contains a pointer. Eg: int * ap [8]; class template-template class template focuses on the template. A template is used to generate classes. Eg:
Template <typename T> class Vector {//...}; // Use this Vector template to generate many classes ), vector <int>, Vector <char>, Vector <int>, Vector <Shape *> ......The focus of the template class is the class. Indicates the class generated by a template. Eg: vector <int>, vector <char>... function template-template function templates focus on templates. A template is used to generate functions. Eg:
Template <typename T> void fun (T ){//... }/* When used, you can explicitly produce template functions, such as fun <int>, fun <double>, and fun <Shape *> ....... You can also use the compiler to deduce template parameters during use to help you generate them implicitly (implicitly. Fun (6); // implicitly generate fun <int> fun (8.9); // implicitly generate fun <double> fun ('A '); // implicitly generate fun <char> Shape * ps = new Cirlcle; fun (ps); // implicitly generate fun <Shape *> */The focus of template functions is on functions. Indicates a function generated by a template. Eg: fun <int> and fun <Shape *> generated by explicit or implicit (implicitly) above ...... All are template functions.
- Class -------------- instance into ----------- object
- Class template --------- convert an instance to ---------- template class
- Function template ------- convert an instance to ---------- Template Function