一、Chapter 8,其他技巧(map和滚动数组未看)
1.灵活运用string(#include“string”)。
2.尽量避免使用gets()。多用scanf。
二、Chapter 2,经典入门
1.sort函数。sort(buf,buf+n)两个参数为起始地址和结束地址。数组按快速排序升序排好。sort(buf,buf+n,cmp)利用自己定义的比较函数cmp对数组进行排序,rule可以是一个比较函数。
2.日期类问题思想——预处理
3.scanf时只有格式为%s时不用&。