I am trying to send and recieve a 5x5 int array. (I posted this in the C forum but just found out i overlooked this forum which is probably the proper place for a Q like this)
In my code I have for sending(UDP) int distvector:
And for recieving I have (UDP) int recv_DV:Code:remoteServAddr.sin_port = htons(5000+i*1000); rc = sendto(sd, &distvector, sizeof((int)distvector), 0, (struct sockaddr *) &remoteServAddr, sizeof(remoteServAddr));
i dont recieve the right array, recv_DV has an odd number in it (I suppose its the array's address) and the rest of the array is '0'. Also in the sendto() function I used distvector instead of &distvector but still the same result.Code:recvfrom(sd, &recv_DV, sizeof((int)recv_DV), 0, (struct sockaddr *) &cliAddr, &cliLen);
ne help would be much appreciated.