Help sending packets

06/26/2012 00:46 dragonsword1#1
well i knew that i need to put the packet in a byte array

so i defined it
Code:
BYTE pack[7] = {
    0x01, 0x00, 
    0x4F, 0x70,  
    0x20, 0x00, 
    0x04    
};
and when i send it using the send through a socket like this
Code:
send(nuconnector,pack, sizeof(pack), 0);
it gives me this error
Code:
error C2664: 'send' : cannot convert parameter 2 from 'BYTE [7]' to 'const char *'
what should i do to make this thing work :S help please :) tanks in advance
06/26/2012 13:30 kevin_owner#2
try this:

Code:
send(nuconnector,&pack, sizeof(pack), 0);
It's been a while since i've used the byte array and sending them so not sure if it works though.
06/27/2012 05:10 dragonsword1#3
its solved i made it
Code:
send(nuconnector,reinterpret_cast <char*>(packet), sizeof(packet), 0);
and it works now :) thanks for the help mate ;)