C++
文章平均质量分 78
vencile ?
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++常见数据类型大小
0xffff 转换成二进制 一个f代表15 转换成二进制是 11114个f,所以是1111 1111 1111 11112^16 = 65535LONG_MIN constant is a macro constant which is defied in climits header, it is used to get the minimum value of a long int object, it returns the minimum value that a long int obje原创 2021-07-02 18:03:30 · 702 阅读 · 0 评论 -
C++类不变式Invariants
类必须实现不变式(Classes Should Enforce Invariants)Bjarne Stroustrup: 我的基本原则式真正的类必须有一个接口,有一个隐含的不变式(invariant)Bill Venners: 不变式(invariant)是什么东西?Bjarne Stroustrup: 什么使一个对象(object)有效?是不变式(invariant)。我以vector举例说明。vector知道自己有n个元素(element),vector也知道自己有一个指针指向这些元素。以上两点原创 2021-06-06 07:10:04 · 1343 阅读 · 0 评论
分享