![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++坑法总结
GX_lofo
这个作者很懒,什么都没留下…
展开
-
STL中二分查找
偶然遇到了一些问题,记录一下 头文件#include <algorithm> 1.binary_search:查找某个元素是否出现。 函数原型:BOOLlower_bound(ForwardIter first, ForwardIter last,const _Tp& val) 函数功能:在数组中以二分法检索的方式查找,若在数组(要求数组元素非递减)中查找到val元素...原创 2019-07-13 20:12:57 · 252 阅读 · 0 评论 -
模板类声明友元函数
问题描述:如题,先看不报错的代码如 template<class DataType = int> class Test { public: void Init(void(*fun)(Test<>&)); template<class DataType = int> //1 friend void fun(Test&...原创 2019-04-17 13:30:21 · 340 阅读 · 0 评论