Hi all,
I need to understand this point, so perhaps someone would be able to help. The following code:
is part of the C Library. Of this, I am interested in knowingCode:struct hostent { 138 char* h_name; ;; official name 139 char** h_aliases; ;; alias list 140 int h_addrtype; ;; host address type 141 int h_length; ;; length of address 142 char** h_addr_list; ;; list of addresses 143 };points to an array of strings and uses NULL (or 0) as the last element in the list. If you put, -1 in place of NULL, you get a compiler warning. So my question is, why is the compiler willing to accept an array initialization in which the last element is not a string, but an integer?Code:char** h_aliases;
Thanks