c/c++
l-_-l
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ptr = (char *)malloc(0)
char *ptr;if ((ptr = (char *)malloc(0)) == NULL) puts( "Got a null pointer "); else puts( "Got a valid pointer "); 上面程序在VC6.0下输出结果是:Got a valid pointer 请问指针转载 2012-04-26 09:39:56 · 1383 阅读 · 0 评论 -
atoi实现
isspace(int x){ if(x==' '||x=='/t'||x=='/n'||x=='/f'||x=='/b'||x=='/r') return 1; else return 0;}isdigit(int x){ if(x='0') return 1; else转载 2012-04-22 00:31:29 · 400 阅读 · 0 评论 -
修改Android模拟器的存储空间
使用模拟器时发现不能向/system目录放东西,报错:out of memory,使用df命令查看发现system目录空闲空间为0,所以不能再向里面增加任何东西。经google发现在启动模拟器时使用这个命令增加其存储空间即可:emulator -partition-size 128 -avd Android2.3.3128是要增加的空间大小,Android2.3.3是模拟器的名字转载 2012-04-22 00:30:07 · 1447 阅读 · 0 评论 -
fgets
FILE *fp = NULL; char line_buf[BUFSIZ]; char *p; nspec = 0;fp=fopen("file","r"); while (fgets(line_buf, sizeof line_buf - 1, fp)) { p = line_buf; while (isspace(*p)) p++; if (*p == '原创 2012-05-08 21:50:27 · 275 阅读 · 0 评论
分享