08 2021 档案

摘要:##C中的字符串相等 ###string: #####1.通过== C中的string类对操作符==实现了重载,可用来判断两字符串的内容是否相等 #####2.通过stdstringcompare 定义: int compare (const string& comparing_str) const 阅读全文
posted @ 2021-08-11 18:24 niu_a 阅读(202) 评论(0) 推荐(0)
摘要:####定义 template <class RandomAccessIterator, class Compare> void sort (RandomAccessIterator first, RandomAccessIterator last, Compare comp); ####作用: S 阅读全文
posted @ 2021-08-09 17:01 niu_a 阅读(149) 评论(0) 推荐(0)
摘要:####定义: void push_back (const value_type& val); ####作用: Add element at the end Adds a new element at the end of the vector, after its current last ele 阅读全文
posted @ 2021-08-09 15:16 niu_a 阅读(525) 评论(0) 推荐(0)
摘要:使用场景 Comparable: 是interface,一般通过implements重写compareTo()方法,是自身与参数的比较 在比较时不再需要comparator javaDoc: int compareTo​(T o) Compares this object with the spec 阅读全文
posted @ 2021-08-06 12:39 niu_a 阅读(378) 评论(0) 推荐(0)