Why does it have to cast to "struct in_addr" in this code? :     TCPStream::TCPStream(int sd, struct sockaddr_in* address) : msd(sd) 
    {
    enter code here
    char ip[50];
    inet_ntop(PF_INET, (struct in_addr*)&(address->sin_addr.s_addr), 
              ip, sizeof(ip)-1);
    m_peerIP = ip;
    m_peerPort = ntohs(address->sin_port);
    enter code here
    }

Why does it have to cast to "struct in_addr" in this code?
What does '50' mean in this code?