hmm another Question: how do i get the length of a packet with null's in example of a packet:
<"name"><null><endian><data><null>
if i do strlen(packet) it returns 4 when it's really > 4 :(
Type: Posts; User: dotslashsatan
hmm another Question: how do i get the length of a packet with null's in example of a packet:
<"name"><null><endian><data><null>
if i do strlen(packet) it returns 4 when it's really > 4 :(
hmm can some one tell me if these functions look ok please?
thanks
int BigEndian8(char *data,int start)
{
unsigned short endian;
endian = data[start];
return endian;
sorry about the confusin and wasteing your time, i've given up need sleep
ah sorry about that last post
printf("%d",0x0001) - works so how would i do
char *HexStr="0001";
printf("%d%s","0x",HexStr)?
printf("%d",0x0100"); works but how would i make it use a string like printf("%d%s","0x","0100); ?
converting a Hex string to integer, sorry
i don't understand 00 = to the left right which = 0 and 01 = to the right so 00 < 01
so how can you do that ? confusing ! shouldnt there be a function for it to make life easyer?
how would i convert a Hex Endian to an int example:
0100 = 256
0001 = 1
etc...
please help!!