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
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:
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
but it still only prints the first char of the string, I think my string has spaces between the characters