What I want to say today is my opinion about TypeDef, not the opinion, but the understanding!
typedef: Take a name for the custom data type; I understand that;
For example, an array of int a[5] and an int B, also define a data variable, can we let int a[5] write as simple as int b? So there's a typedef. You can name the custom data type, and this usage will be used in the renaming of struct struct;
typedef int AA[5];//Defines the data type of an array here, remembering that only memory is allocated, that there is no space allocated, and that the types and variables are not the same
typedef int (*AA1) [5];//defines an array pointer type here, at the same time
{
int//The only way to write this is to not allocate memory space
int a_1;//This is the ability to successfully define a variable, that is, to allocate space for it
aa//(IBID.) AA is just a data type, which cannot allocate memory space by a data type; So you also define a variable name
AA a_2;//Here is a successful definition of an array of a_2, in fact, can be seen in this way AA a_2==> int a_2[5]; just less write [5], feel some like a macro replacement;
So if we want to define an array pointer: You can write this
int (*a_3) [5];//This is one of our usual
Or with our custom data type;
AA *a_4;//This is the same as a normal array pointer usage, because a one-dimensional array a_4 equivalent to a first-level pointer, then *a_4 is equivalent to a level two pointer
or the Third kind.
Aa1 a_5;//to customize an array pointer variable
A_4 = &a_2;//a_2 is equivalent to a first-level pointer, and the address can be passed to a level two pointer.
}
These are typedef.
typedef insight is how to define an array pointer