简体   繁体   中英

Typedef pointer to an array of another typedef

I will like to declare a typedef, something like this:

  • Pointer to any array of another typedef.

for eg:

Typedef 1:

typedef struct
{
    int a;
}structA_t1;

Typedef 2:

typedef ptrstructA  structA_t1 (*Temp)[]  ;

Is this second typedef correct ? Do i really need this Temp name here ? Please suggest, thanks

The name of the newly defined type comes in the end:

typedef structA_t1 **ptrstructA;

or:

typedef structA_t1 (*ptrstructA)[];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM