我想到的指针用法是这样,请指教
- #include <reg52.h>
- typedef unsigned char u8; //0 to 255
- typedef unsigned int u16; //0 to 65535
- typedef unsigned long u32; //0 to 4294967295
- u8 U8RH_data_temp[2] = {0x12, 0x23};//{High Byte, Low Byte}
- u16 *U16RH_data_temp;
- void main()
- {
- U16RH_data_temp = (u16*)U8RH_data_temp;
- while (1)
- {
- }
- }
复制代码
|