C++ 模板

来源:互联网 发布:华云数据待遇如何知乎 编辑:程序博客网 时间:2024/06/07 10:13

C++ 模板应用非常广泛,有必要学习下
C++ 的标准库提供许多有用的函数大多结合了模板的观念,如STL以及IO Stream。

模板的声明形式如下:

template <class identifier> function_declaration;template <typename identifier> function_declaration;

github代码:
https://github.com/haohaibo/learn/tree/master/test/advanced/cpp_tutorial/template

参考:
https://www.cnblogs.com/ggjucheng/archive/2011/12/18/2292090.html
https://www.cnblogs.com/gw811/archive/2012/10/25/2738929.html