Chinaunix首页 | 论坛 | 博客
  • 博客访问: 104553
  • 博文数量: 31
  • 博客积分: 2292
  • 博客等级: 大尉
  • 技术积分: 310
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-17 23:41
文章分类

全部博文(31)

文章存档

2011年(2)

2010年(29)

分类: LINUX

2010-10-02 12:26:12

1.sprinf的用法
驱动程序中用到的还是蛮多的
Sprinf的用法 分享

2.c语言中的false true

使用bool类型定义变量时,编译出错。错误信息显示如下:

     'bool' undeclared (first use in this function)
     (Each undeclared identifier is reported only once
     for each function it appears in.)

  C语言(或C++)里本身没有bool这种布尔类型。有些编译器可以识别,那也是因为编译器自己定义了bool类型,比如:#define bool int。

  C语言里,一般用整型变量来实现布尔型变量的功能。当用条件语句,如if,进行判断时,值为0时返回false,其它都返回true。

#ifndef true

#define true 1

#endif

#ifndef false

#define false

#endif

3 linux下的定时计时操作




阅读(1147) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~