- 博客(5)
- 收藏
- 关注
原创 EOF的理解
因为自己不大清楚EOF 在terminal里面是怎么输入的,所以做了一个小实验。#include #include int main(){ int c ;// FILE * fp; // fp = fopen("hello.txt","r+"); c = fgetc(stdin); if (c == EOF) pr
2017-04-16 21:27:29
386
原创 Segmentation fault 定位
看了酷壳上这个贴http://coolshell.cn/articles/11377.html#include structstr{ intlen; chars[0];}; structfoo { structstr *a;}; intmain(intargc, char** argv) {
2014-11-16 16:58:53
1857
转载 const的object和 const member function
例子从 书上代码copy的。例子说明了错误当我们用一个const object调用一个non const object的时候会编译错误。 提示can not convert 'this ' pointer from 'const Time' TO 'Time & ' 另外一个编译错误也是类似的// Fig. 10.1: Time.h// Time class definition with
2014-01-14 23:31:03
1170
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人