摘要: (1)为了运用priority_queue,你必须包含头文件:#include(2)在头文件中priority_queue定义如下:namespace std{ template , class Compare = less > class priority_queue;}第一个template参数代表元素型别,带有默认值的第二个参数用来定义priority_queue内部存放元素所用的实际容器,缺省采用vector。第三个参数定义出“用以搜索下一个最高优先元素”的排序准则,缺省下是以operator <作为比较标准。实际上priority_... 阅读全文
posted @ 2013-08-03 08:21 老司机 阅读(911) 评论(0) 推荐(0) 编辑