Talie
1
Hello !
I want to communicate with UDP, but I am not able to user SDLNet_UDP_Send
because of the type of the arguments. See my example:
char* mess_data;
UDPpacket *packet;
mess_data = “Hello”;
packet->data = mess_data;
When I compile, I have the message:
invalid conversion from char*' to
Uint8*’
Please Help !!!
Hi there,
packet->data = mess_data;
When I compile, I have the message:
invalid conversion from char*' to
Uint8*’
try packet->data = (Uint8 *) mess_data;
this should work fine.–
Steffen Pohle (@Steffen_Pohle)| _ x
http://stpohle.bei.t-online.de | /#/ BomberClone - The Clone of
JabberID: stpohle at amessage.de ||###| DynaBlaster and Bomberman
ICQ: 370965 Yahoo: stpohle | #/ http://www.bomberclone.de
MSN: stpohle at hotmail.com |
talie wrote:
Hello !
I want to communicate with UDP, but I am not able to user SDLNet_UDP_Send
because of the type of the arguments. See my example:
char* mess_data;
UDPpacket *packet;
mess_data = “Hello”;
packet->data = mess_data;
When I compile, I have the message:
invalid conversion from char*' to
Uint8*’
this is not SDL related but anyway:
you have to cast mess_data to Uint8* (since packet->data is a Uint8*):
packet->data = (Uint8*) mess_data;