Per l'inserimento di 127.0.0.1 anzichè localhost non riesco a capire come procedere.


Per le stringhe sto provando così, ma mi dà errore sull'argomento 2 del send:


struct stringab {
char a[];
char b[];
} ab;




void* abptr = &ab;


char a[];
printf ("Inserisci prima stringa");
scanf ("%s", ab.a);


char b[];
printf ("Inserisci seconda stringa");
scanf ("%s", ab.b);






if (send(Csocket, (char*)abptr, sizeof(ab), 0) != sizeof(ab)) {
printf("client-send() sent a different number of bytes than expected");
closesocket(Csocket);
ClearWinSock();
system ("pause");
return 0;
}