摘要: 题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rain 阅读全文
posted @ 2016-09-01 21:35 wangxiaobao1114 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1.从函数模板谈起 函数模板的类型推导机制是在c++98时代就有的,auto的类型推导机制与其基本一致,所以先理解函数模板类型推导。 函数模板可以用如下代码框架表示: PT与T的不同之处在于PT相对于T可能有一些饰词(adornments),如const 和引用&。 对于模板类型T的推导是PT和ex 阅读全文
posted @ 2016-09-01 12:34 wangxiaobao1114 阅读(2960) 评论(0) 推荐(1) 编辑