首页 | 手机版 | 三国演义 | 三国志 | 史将 | 背景 | 藏书阁
首页 -> 精彩文章 -> 国图读书记

国图读书记

作者拉格浪日 标签技术 阅读次数:23
今天看了2本c书.
1.《c语言参考手册》 Sammel P. Harbison ,Guy L Steele jr.

邱仲潘翻译,机械03年出版.
web:AReferenceManual.com
2.《c 语言解析教程 4 edition》 Al Kelley Ira Pohl.麻志毅翻译,机工 2002 aw.com
1
c89:const,volatile
c95:引入多字节字符与宽字符
c99:扩展整型,变长数组,布尔类型,c++风格注释 //
2.例子
hello.c
#inlcude
void hello(void)
{
printf("hello! \n");
}
hello.h
extern void hello(void)
startup.c
#include "hello.h"
int main(void)
{
hello();
return 0;
}
3.
c语言中区分标志符的大小写
sizeof()返回操作数长度 "abc" 4
strlen返回字符数 "abc" 3
char *p="pope";p[0]='x'也许有错,对只读内存的写操作可能会有运行是错误
预编译指令
#if #else # endif
c++调用c函数 extern "C" int f(void)
assert.h assert(a<1)显示并终止 NDEBUG 会终止所有断言
typedef 将标志符与特定的类型联系起来 typedef int color;
c++ 字符串可以如下定义string a,b("abc");p
int sscanf(const char *s ,condt char * format,...)从特定的字符串里读内容
fscanf,fprintf 文件的特定读写
system:访问操作系统的命令


浙ICP备06020153号-1