GNU C ANSI C 一些区别
1 可变数据结构
struct var_data
{
int len;
char data[0];
};
遍历len后数据
for(i = 0; i < s.len; i++)
{
printf("%02x",s.data[i]);
}
2 case 范围区间 【x,y】
3 语句表达
#define min_t (type, x, y) \
({ type __x = (x); type __y = (y); __x < __y ? __x: __y;})
int ia, ib, mini;
float fa, fb, minf;
mini = min_t ( int, ia, ib);
minf = min_f (float, fa, fb);
标准c:
#define min (x, y) ((x) < (y) ? (x) : (y))
代码min ( ++ia, ++ib) 被展开为 ((++ia) < (++ib) ? (++ia):(++ib)) ia,ib 被加了两次。
4 typeof
#define min(x, y) ( {\
const typeof(x) __x = (x); \
const typeof(y) __y = (y);\
(void) (&__x ==&__y); \
__x <_ _y ? __x : __y ;})
5 pr_debug 可防止在参数选项不代表任何参数的时候 不输出,。
6 可指定范围初始化数组 unsigned char data [MAX] = { [0 ... MAX - 2] = 0};
结构体成员初始化结构体:
struct file_operations ext2_file_operations =
{
llseek:generic_file_llseek,
read: generic_file_read,
}
同样,标准c:
struct file_operations ext2_file_opreations =
{
.llseek = generic_file_llseek,
.read = generic_file_read,
}
.....
相关文档:
C 的开始
2010年2月10日,
开始阅读家里有关"C语言"的各种资料。
使用 TurboC2.0,偶尔可能也会用到 Microsoft Visual C++ 6.0。 ......
B/S结构(Browser/Server结构)结构即浏览器和服务器结构。它是随着Internet技术的兴起,对C/S结构的一种变化或者改进的结构。在这种结构下,用户工作界面是通过WWW浏览器来实现,极少部分事务逻辑在前端(Browser)实现,但是主要事务逻辑在服务器端(Server)实现,形成所谓三层3-tier结构。这样就大大简化了客户端电脑载 ......
windows7 + ubuntu9.10双启动,这个有太多的帖子了,不过这次的情况比较复杂.
先装的WIN7,后装UBUNTU,没有任何问题.GRUB双启动.
后来因为一个情况,要装XP,把WIN7做了 ghost.装完XP,GRUB当然没有了,于是用ubuntu启动盘修复.
虽然启动菜单出来了,但只能进行ubuntu,进入windows的时候就提示error:cannot get C/H/S value ......
转载自:http://www.cnblogs.com/eddyshn/archive/2009/11/23/1608823.html
VC编译选项 多线程(/MT)
多线程调试(/MTd)
多线程 DLL (/MD)
多线程调试 DLL (/MDd)
C 运行时库   ......