Re: byte order



int* p = new int[10];
int pval=(int)p;

callbackFoo(pval);

...

callbackFoo(int pval)
{
int* p=(int*)pval;

int ppp=pval[0]; ///Error the byte order are upsidedown.
}

Hi,
Why do you cast the pointer to an int?
The code you show does not cause any byte swapping by itself.
Is the int passed to a DLL built with another language or something? And
where does the callback function come from?

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"


.