
C-C++
文章平均质量分 59
沉ing
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
关于 strlen 和 sizeof的区别
关于strlen和sizeof的区别strlen 和 sizeof 自己一直没有注意去研究,一直迷惑, 凡事还需巨细靡遗啊!巨细靡遗! 巨细靡遗![strlen]c++ reference 中说: The length of a C string is determined by the terminating null-character: A C string is as long as t原创 2017-02-28 13:38:29 · 434 阅读 · 0 评论 -
用汇编的思想理解C/C++
最近面试找工作, 遇到一个美团一个很好的面试官。 虽然面试结果可能不尽如意, 但是面试官给出的意见确非常中肯。 所以觉得有必要重新学习一下基础。 就从操作系统开始学起。刚好之前从git上发现有人共享了一本30天自制操作系统。 书的标题虽然有点夸张, 但是觉得还是觉得跟着一步一步写,效果会比单纯的看长篇大论的理论要好。 也放出github的地址, 有兴趣的也可以下下来看看。30天自制操作系统一切皆0原创 2017-03-02 23:08:43 · 1077 阅读 · 0 评论 -
const 真难啊
const 真TM 难啊const int a = 3;// easyconst int *b = &a;const int *x = b;// *x is a const value *x = 4; // errorconst int *c = &a;x = c; // rightconst int* const y = b;原创 2017-03-10 10:00:24 · 342 阅读 · 0 评论 -
leetcode 刷题(求树的直径)
树的直径的定义:The diameter of a binary tree is the length of thelongest path between any two nodes in a tree. This path may or may not pass through the root.我首先想到的思路是: 直径必然是两个叶子节点之间的距离的最大值, 怎么求这原创 2017-03-23 10:52:03 · 1552 阅读 · 0 评论