软讯网络 > 编程语言 > C/C++ > #define 和 typedef
【标 题】:#define 和 typedef
【关键字】:
#define,typedef
【来 源】:http://www.cublog.cn/u/20619/showart.php?id=128201
#define 和 typedef
今天发现C专家编程真是本好书,白天还真思考的问题,晚上解决了,哈哈.下面我就说说
第一点区别:
#define peach int
unsigned peach i;//ok
typedef peach int//error
第二点:
#define int_ptr int *
int_ptr chalk, cheese
int *chalk,chees;
typedef char* char_ptr
char_ptr Bentley, Rolls_Royce;