08 2012 档案
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> template<typenameT1,typenameT2>inlineconstboolcompare_type(T1,T2){returnfalse;}template<>inlineconstboolcompare_type(int,int){returntrue;}template<>inlineconstboolcompare_type(floa
阅读全文
摘要:在STL中list是以双向链表的方式来存储的,应此使用给定的下标值来找到对应的节点所需的时间复杂度为O(n),相比vector直接使用原生指针会慢一些。因为是双向链表的关系,那么必然有一种结构来表示链表中的节点。Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> template<typenameT>struct__list_node{__list_node<T>*prev;__list_node<T>*ne
阅读全文