Answer the question
In order to leave comments, you need to log in
C++ TCP client, can't understand connect() function argument?
There is a small TCP client, everything is more clear in it, except for the line
connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
connect(sockfd,serv_addr, sizeof(serv_addr));
(struct sockaddr *)&serv_addr
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question