Code
while (fgets(buf, sizeof(buf), stdin)) {
buf[MAX_LINE-1] = '\0';
len = strlen(buf) + 1;
send(s, buf, len, 0);
into??
Code
while (fgets(buf, sizeof(buf), stdin)) {
if strlen (140 > buf[MAX_LINE-1] = '\0';) {
printf("Message too long!\n")
else
len = strlen(buf) + 1;
send(s, buf, len, 0);
}
Wow my coding sucks, I have no idea where to put the {} and I know that's not even right lol...
This post was edited by Trev on Sep 23 2013 07:32pm