
Pointer to a struct within an array Help Please
I am not sure if this is the correct group but here goes.
Thanks in advance for any help.
I have the following struct:
struct PlayerData {
struct sockaddr_in addr;
int fd;
}Player[5];
I need to pass a pointer to accept(); to Player[variable].addr
i.e. .... accept(sockfd, (struct
sockaddr_in *)Player[variable].addr, &addr_length);
variable is already set as type int and addr_length = sizeof(struct
sockaddr_in)
I am getting the following errors using gcc on Linux 2.0.30
.cannot convert pointer to type
.warning: passing arg 2 of 'accept' from incompatible pointer type
I admitedly am very new to pointers and still have problems, any help
would be greatly appreciated.
Thanks,
James A Culp III
aka illitrit