c ÓïÑÔ³£Óú궨Òå Ä£°å
³£Óú궨Òå
1¡¢·ÀÖ¹Ò»¸öÍ·Îļþ±»Öظ´°üº¬
#ifndef COMDEF_H
#define COMDEF_H
//Í·ÎļþÄÚÈÝ
#endif
2¡¢ÖØж¨ÒåһЩÀàÐÍ£¬·ÀÖ¹ÓÉÓÚ¸÷ÖÖƽ̨ºÍ±àÒëÆ÷µÄ²»Í¬£¬¶ø²úÉúµÄÀàÐÍ×Ö½ÚÊý²îÒ죬·½±ãÒÆÖ²¡£
typedef unsigned char boolean; /* Boolean value type. */
typedef unsigned long int uint32; /* Unsigned 32 bit value */
typedef unsigned short uint16; /* Unsigned 16 bit value */
typedef unsigned char uint8; /* Unsigned 8 bit value */
typedef signed long int int32; /* Signed 32 bit value */
typedef signed short int16; /* Signed 16 bit value */
typedef signed char int8; /* Signed 8 bit value */
//ÏÂÃæµÄ²»½¨ÒéʹÓÃ
typedef unsigned char byte; /* Unsigned 8 bit value type. */
typedef unsigned short word; /* Unsinged 16 bit value type. */
typedef unsigned long dword; /* Unsigned 32 bit value type. */
typedef unsigned char uint1; /* Unsigned 8 bit value type. */
typedef unsigned short uint2; /* Unsigned 16 bit value type. */
typedef unsigned long uint4; /* Unsigned 32 bit value type. */
typedef signed char int1; /* Signed 8&nb
Ïà¹ØÎĵµ£º
<!--
@page { margin: 0.79in }
P { margin-bottom: 0.08in }
-->
ÊÇCÉî¶È½âÆÊ P47µÄһϵÁйØÓÚdefineºÍtypedefµÄÓ÷¨£º
/****ÒÔÏÂÊÇ
#define
a int[10]
µÄ¸÷ÖÖÓ÷¨£¬¶¼±¨´í
***
a[10]
a[10];
//**************
a[10]
a;
//**************
int
a[10];
//*** ......
__DATE__
½øÐÐÔ¤´¦ÀíµÄÈÕÆÚ£¨“Mmm dd yyyy”ÐÎʽµÄ×Ö·û´®ÎÄ×Ö£©
__FILE__
´ú±íµ±Ç°Ô´´úÂëÎļþÃûµÄ×Ö·û´®ÎÄ×Ö
__LINE__
´ú±íµ±Ç°Ô´´úÂëÖеÄÐкŵÄÕûÊý³£Á¿
__TIME__
Ô´Îļþ±àÒëʱ¼ä£¬¸ñʽ΢“hh£ºmm£ºss”
__func__
µ±Ç°ËùÔÚº¯ÊýÃû
ÏÂÃæÒ»¸öÀý×ÓÊÇ´òÓ¡ÉÏÃæÕâЩԤ¶¨ÒåµÄºêµÄ¡£
¡¡¡¡#in ......
ÈÃÎÒÃÇ´ÓÒ»¸ö·Ç³£¼òµ¥µÄÀý×Ó¿ªÊ¼£¬ÈçÏ£º
int n;
Õâ¸öÓ¦¸Ã±»Àí½âΪ“declare n as an int”£¨nÊÇÒ»¸öintÐ͵ıäÁ¿£©¡£
½ÓÏÂÈ¥À´¿´Ò»ÏÂÖ¸Õë±äÁ¿£¬ÈçÏ£º
int *p;
Õâ
¸öÓ¦¸Ã±»Àí½âΪ“declare p as an int *”£¨pÊÇÒ»¸öint
*Ð͵ıäÁ¿£©£¬»òÕß˵pÊÇÒ»¸öÖ¸ÏòÒ»¸öintÐͱäÁ¿µÄÖ¸Õë¡£ÎÒÏëÔÚÕ ......