gpt4 book ai didi

c - 卡在 C 指针结构中

转载 作者:太空宇宙 更新时间:2023-11-04 00:40:44 26 4
gpt4 key购买 nike

我正在研究嵌入式 C。我被指针结构困住了....

结构如下..

/*structure 1*/
ZPS_tsAplApsmeBindingTableType *psAplApsmeAibBindingTable;

/*structure 2*/
typedef struct
{
ZPS_tsAplApsmeBindingTableCache* psAplApsmeBindingTableCache;
ZPS_tsAplApsmeBindingTable* psAplApsmeBindingTable;
}ZPS_tsAplApsmeBindingTableType;

/*structure3*/
typedef struct
{
uint64 u64SourceAddress;
ZPS_tsAplApsmeBindingTableEntry* pvAplApsmeBindingTableEntryForSpSrcAddr;
uint32 u32SizeOfBindingTable;
}ZPS_tsAplApsmeBindingTable;

/*structure 4*/
typedef struct
{
ZPS_tuAddress uDstAddress;
uint16 u16ClusterId;
uint8 u8DstAddrMode;
uint8 u8SourceEndpoint;
uint8 u8DestinationEndPoint;
} ZPS_tsAplApsmeBindingTableEntry;

我已经声明了 ZPS_tsAplApsmeBindingTableType *p; 但我想访问 ZPS_tsAplApsmeBindingTableEntry 结构值...我该怎么做?

谁能告诉我这两者的区别

ZPS_tsAplApsmeBindingTable* psAplApsmeBindingTable

ZPS_tsAplApsmeBindingTable *psAplApsmeBindingTable;

谢谢....

最佳答案

  1. p->psAplApsmeBindingTable->pvAplApsmeBindingTableEntryForSpSrcAddr->someField
  2. 没有区别。

附言。该代码真的非常难看。

关于c - 卡在 C 指针结构中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9366720/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com