const char* bufmessage = PlayerLocation;
int sendOK = sendto(out, bufmessage, strlen(bufmessage), 0, (sockaddr*)&server, sizeof(server));
no suitable conversion for FString to const char*
A 1 line solution to convert from some FString to char* would be this:
// Assuming you have some FString myFString created e.g., with TEXT("Some FString")
char* result = TCHAR_TO_ANSI(*myFString);
Note: As the comments point out, this assumes the FString will not go out of scope.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With