2024-7
一. 参考网址
4. 内存的栈和堆的区别
9. How to Use Cron on Linux: Tips, Tricks, and Examples
10. 算法可视化
11. 堆树(最大堆、最小堆)详解
二. 计算机术语
1. TAOCP: The Art of Computer Programming (TAOCP)计算机程序设计艺术
三. 实战
1. 使用strtok_r()出现段错误
原因:程序中的源字符串使用了常量字符串,只读;但strok_r函数会去修改源字符串,从而导致段错误
解决:把源字符串初始化/拷贝到栈或者堆上
strtok_r帮助文档的使用注意事项:
BUGS
Be cautious when using these functions. If you do use them, note that:
* These functions modify their first argument.
* These functions cannot be used on constant strings.
* The identity of the delimiting byte is lost.
* The strtok() function uses a static buffer while parsing, so it's not thread safe. Use strtok_r() if this matters to you.