日常问题
mazongcheng
这个作者很懒,什么都没留下…
展开
-
cout不明确
可能的解决办法1.检查是否左右大括号的数目不等 2.去掉using namespace std;再重新加回来 3.试一试using std::cin和using std::cout 4.保存,重启原创 2017-08-27 20:18:52 · 1980 阅读 · 1 评论 -
<algorithm>的排序用法
algorithm的排序用法1、sort函数的时间复杂度为n*log2(n),执行效率较高。 2、sort函数的形式为sort(first,end,method),其中第三个参数可选。 3、若为两个参数,则sort的排序默认是从小到大 4、若需要从大到小排序,则应添加函数method,如 sort(first,end,method); bool method(int原创 2017-08-29 10:21:11 · 230 阅读 · 0 评论