Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

how to take user input in a client server program in c++

char sendbuf[BUFFER_SIZE];
fgets(sendbuf, sizeof(sendbuf), stdin);
send(sock_cli, sendbuf, strlen(sendbuf),0); //Send out
memset(sendbuf, 0, sizeof(sendbuf));
 
PREVIOUS NEXT
Tagged: #user #input #client #server #program
ADD COMMENT
Topic
Name
2+2 =