C programming and receiving information with a server
I am having problems working with arrays and receiving data from remote hosts. I was hoping someone might be able to help me with my problem. Basically I just need help with comparing arrays that I have received from a remote host using the function recv. I recv data but I cant compare data with strings because when I receive data I either receive 11 characters or 0. Is there a way to tell exactly what someone typed even after receiving 11 characters of a string that was only 5 characters long? How can I compare "n" with "???????????" (notice there are 11 questions marks there because I recv 11 bytes every tie I receive data).
|