摘要: 模板定义:模板就是实现代码重用机制的一种工具,它可以实现类型参数化,即把类型定义为参数, 从而实现了真正的代码可重用性。 函数模板: 格式如下: template <typename 类型参数1, typename 类型参数2, ...> 返回类型 函数名(形参表) { // 函数定义 } #inc 阅读全文
posted @ 2023-09-13 16:56 jason8826 阅读(59) 评论(0) 推荐(0)
摘要: 转载:https://www.cnblogs.com/yif1991/p/5049638.html 转载:https://www.cnblogs.com/darren-pty/p/14241169.html 阅读全文
posted @ 2023-09-13 15:45 jason8826 阅读(18) 评论(0) 推荐(0)