The name of the array in C is the address of the first element, so you can assign it directly to a pointer without having to take an address.
1 void Initbitree (sqbitree T) 2 // constructs an empty binary tree T. Because T is an array name, it does not need &3 int i; 4 for (i=0; i<max_tree_size;i++) 5 // Null value (nil is defined in the main path) 6 }
In the above initialization code, T is an array name, which also represents the first address of the array, which is an address and does not require an address character.
It's not the same as the bottom initialization.
1 void Initstring (HString &T) 2 // Initialize (generate empty string) of string T. 3 t.length=5; 4 T.ch="hhhhh"; 5 }6
The resulting string T is not an address, so you need to add the address character to initialize the string T and change its internal value. If not added, only in this function when the main function is executed, in memory to allocate another piece of storage to store, when the function is finished, the memory is allocated will be retracted, there is no change in the original string value.
About the C language: initializing a pointer variable to an array why don't I need the & symbol?