We would need to see what your sendto() looks like, to start making any guesses as to whether your receive code is doing anything useful.
Assuming for the moment that it is a string of printable characters, then it is broken.
Code:
char buf1[1024];
result = recvfrom(sockfd, buf1, 1024, 0, (struct sockaddr *) &udp_fromaddr, &length);
cout << "Bytes Received: " << result << "\n";
string newbuf;
newbuf = buf1;
a) there is no evidence of a \0
b) recvfrom() won't add one for you, unless you explicitly send a \0
c) there isn't room in the buffer to add a \0, if recvfrom() writes 1024 bytes of data.