标准C库的学习-P.J.PLAUCER The Standard C Library读书笔记(一)
来源:互联网 发布:货币战争知乎 编辑:程序博客网 时间:2024/05/01 23:21
看了PLAUCER的书。才发现对经典的标准C库知之甚少,用过但没系统的学习过,现在通过PLAUCER的书好好的研究一下吧!
PLAUCER对库的定义:A library is a collection of program components that can be reused in many programs. Most programming languages include some form of library. The programming language C is no exception. It began accreting useful functions right from the start. These functions help you classify characters, manipulate character strings, read input, and write output -to name just a few categories of services。
标准C库共在15个头文件中做出声明,还包含对相关的类型和宏的定义:<assert.h><locale.h><stddef.h><stype.h><math.h><stdio.h><errno.h><setjmp.h><stdlib.h><float.h><signal.h><string.h><limits.h><stdarg.h><time.h>。
对于头文件的定义有Idempotence、mutual independence和declaration equivalence三条准则:
就我自己的理解所谓的Idempotence就是为了不让头文件重复定义,在开头用宏把头文件保护起来:
#ifndef _STDIO_H
#define _STDIO_H
..../* the body of <stdio.h> */
#endif
这样已经定义的头文件就不会被再次定义。
mutual independence就是在不同的头文件中可能有一个名字进行了分别定义,为了保证不出错我们也要利用宏包这样的定义保护起来:
#ifndef _SIZE_T
#define _SIZE_T
typedef unsigned int size_t;
#endif
- 标准C库的学习-P.J.PLAUCER The Standard C Library读书笔记(一)
- The Standard C Library
- the C standard library 学习笔记
- (转)The Standard C Library 经典的基础(上)
- (转)The Standard C Library 经典的基础(下)
- C++,VC++,MFC,STL(standard template library,标准模板库)
- 《C++标准程序库(The C++ Standard Library)》读书笔记
- Python标准库The Python Standard Library
- 标准模板库(Standard Template Library,STL)学习
- 《The C++ Standard Library》读书笔记
- C Standard Library
- C Standard Library
- C Standard Library
- C standard library headers
- C Standard Library
- The C++ Standard Library 06 The Standard Template Library 标准模板库
- Standard Template Library(标准模版库)
- C运行时库、C++ Standard Library
- Android EditView属性解析
- 使用/sys文件系统访问Linux内核
- libnids使用
- javascript面向对象
- 第一次发帖
- 标准C库的学习-P.J.PLAUCER The Standard C Library读书笔记(一)
- Callback 在Java和C语言中的实现
- java网络编程之UDP
- C/Java 多线程
- js -计算器
- IE6 中的最大最小寬度和高度 css 高度 控制(兼容版本)
- 正则表达式基础知识
- mysql导入导出命令
- 正则表达式