I am a newbie to socket programming. I want to know why we need to do casting like this (struct sockaddr *) &servAddrbind
when we bind a socket:
bind (sockfd, (struct sockaddr *) &servAddr, sizeof(servAddr));
Why can't we do binding without such cast?