pointer and address to that pointer lead to the same thing

后端 未结 2 1903
自闭症患者
自闭症患者 2021-01-29 08:18

When I saw this those lines :

BYTE MessageToProcess[MAX_MESSAGE_LENGTH];
TcpIpPacketHdr *pHdr = (TcpIpPacketHdr*)&MessageToProcess;

I said

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-29 08:22

    MessageToProcess is an array.

    In case of array, base address of array can be indicated by following ways alternatively:

    &MessageToProcess OR MessageToProcess OR &MessageToProcess[0].

提交回复
热议问题