Code: Select all
char username[16];
memset(username,0,16);
int position=0;
char chardata;
strcpy(message,"
Login:");
send(theClient,message,strlen(message),0);
while((chardata!='
')&&(position<16))
{
recv(theClient,&chardata,1,0);
username[position]=chardata;
send(theClient,&username[position],1,0);
position++;
}
Archived topic from Anythingforums, old topic ID:1125, old post ID:14166