UDP Payload

24 Feb 2010 . Edited: 24 Feb 2010

I'm fairly new to c++ and am trying to send a string to my mbed over UDP and just print it out over com port for now. Using:

 

char *string=p->payload;
printf("Incoming string is %s\n",string);

but I get an error

"A value of type "void *" cannot be used to initialize an entity of type "char *" (E144)" in file "/UDPCOM/main.cpp"

Thanks for the help.

 

New info:

I think the answer has been right in front of me in ethernettester

 

data = static_cast<char *>(p->payload)
printf("Request:\r\n%s\r\n", data);

but it still only prints the first char of the string, I think my string has spaces between the characters

Ya it was my Visual basic string sender