![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++11
拥抱新生活
怀揣着对未来世界美好的憧憬,从容燃烧
展开
-
sort等库函数不能调用class方法的问题
class solution { pulbic: bool cmp(int,int){}; void myf(vector<int>&nums) { sort(nums.begin(),nums.end(),cmp);//此处的leetcode等编译器提示invalid use of non-static member function,VS提示:应输入2个参原创 2016-10-21 15:03:13 · 388 阅读 · 0 评论 -
C++11重要特性:lambda+function
1. lambda lambda-introducer (捕获字段)lambda-parameter-declaration-list (变量列表)mutable-specification (捕获的变量可否修改)exception-specification (异常设定)lambda-return-type-clause (返回类型)compound-statement原创 2016-10-19 10:43:46 · 3641 阅读 · 0 评论