C 标准库 —— stdio.h
2016-05-12 00:10
232 查看
C 标准库—— string.h
C 标准库 —— time.h
C 标准库 —— limits.h
C 标准库 —— stdio.h
C 标准库—— stdlib.h(包括 rand srand 的实现)
C 标准库——<cmath>/<math.h>
C 标准库—— assert.h
C 标准库 —— time.h
C 标准库 —— limits.h
C 标准库 —— stdio.h
C 标准库—— stdlib.h(包括 rand srand 的实现)
C 标准库——<cmath>/<math.h>
C 标准库—— assert.h
1. 类型及宏定义
(1)NULL#ifndef NULL #ifdef __cplusplus #define NULL 0 #else /* __cplusplus */ #define NULL ((void *)0) #endif /* __cplusplus */ #endif /* NULL */
2. io 处理
不安全的 gets 函数(未对输入的字符数进行限制)// 输入参数是目标数组 char *gets(char* dst) { int c = getchar(); // 从控制台读入一个字符 char *p = dst; while (c != EOF || c != '\n') { *p++ = c; // 问题便出在这里,只要输入不结束,指针就会一直遍历赋值下去 c = getchar(); } *p = '\0'; return dst; }
相关文章推荐
- CentOS7 下linux不能上网解决方法,centos7 eth0 没有ip,IP突然丢失
- nefu阶乘定理
- C/C++中结构体与类的区别
- 一个例子深入理解ClassLoader
- CocoaPods相关知识点
- dede taglist模板中调用自定义字段
- 关于mockito的一些文章
- Leetcode Everyday: 100. Same Tree
- Block
- 测试计划
- Mac Android 源码下载 编译 运行 Android6.0.1
- CVG Talk - Saliency based detection
- Golang 编译 条件编译
- Android自定义视图动画(二)
- 笔试总结
- [转]setValue和setObject的区别
- 14.二分查找
- Mac下ll、l、la、等简写命令不能使用
- php生成Android客户端扫描可登录的二维码
- 在ASP.NET 2.0中操作数据之三十六:在DataList里编辑和删除数据概述