I have a problem with the typedef keywords in C language.
In my program, I use the following codes:
typedef int* a[10];
int main(){
int a[10];
}
they work well. But why there are no conflicts between a variable and a type sharing the same name a?
Regards.
See msdn C language reference:
Typedef names share the name space with ordinary identifiers (see Name Spaces for more information). Therefore, a program can have a typedef name and a local-scope identifier by the same name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With