hojoff79
30th March 2011, 01:56
I'm doing some network programming but I am having trouble understanding exactly what the syntax of this line means. It is:
(struct sockaddr_in *)p->ai_addr
I understand the p->ai_addr points to the element of ai_addr in the object pointed to by p, but I don't understand the beginning part (struct sockaddr_in *) and how that is being applied to the p->ai_addr part.
Thanks in advance.
(struct sockaddr_in *)p->ai_addr
I understand the p->ai_addr points to the element of ai_addr in the object pointed to by p, but I don't understand the beginning part (struct sockaddr_in *) and how that is being applied to the p->ai_addr part.
Thanks in advance.