摘要: template Error_code List :: remove( int position , List_entry &x) { if (count == 0) return underflow ; if (position =count) return range_error ; x = entry[position ];/X是被删除的元素 count −−; while (position < count){ entry[position] = entry[position+1]; position++ ; } return success;} 阅读全文
posted @ 2013-09-26 18:32 XTQ 阅读(154) 评论(0) 推荐(0)
摘要: The constructor Listtemplate List :: List( ) { count = 0; }cleartemplate voidList :: clear( ) { count = 0; }emptytemplate boolList :: empty( ) const { return count boolList :: full( ) const { return count >=max_list; }replacetemplate Error_code List :: replace( int position , const List_en... 阅读全文
posted @ 2013-09-26 18:29 XTQ 阅读(389) 评论(0) 推荐(0)