分类:
2008-10-15 16:39:41
#define LEN 32 char string1 [LEN]; memset (string1,0,LEN); strcpy (string1,“This is a example!!”); |
const char string2[LEN] =“This is a example!”; char * cp; cp = string2 ; (使用的时候可以直接用指针来操作。) |
#define bwMCDR2_ADDRESS 4 #define bsMCDR2_ADDRESS 17 int BIT_MASK(int __bf) { return ((1U << (bw ## __bf)) - 1) << (bs ## __bf); } void SET_BITS(int __dst, int __bf, int __val) { __dst = ((__dst) & ~(BIT_MASK(__bf))) | (((__val) << (bs ## __bf)) & (BIT_MASK(__bf)))) } SET_BITS(MCDR2, MCDR2_ADDRESS, RegisterNumber); |
[1]