endians
Kenneth Brody
kenbrody at bestweb.net
Mon Nov 28 13:15:40 PST 2005
Quoting Dennis Malen (Mon, 28 Nov 2005 16:07:45 -0500):
[...]
> endiantest[3]: 0403-057 Syntax error at line 6 : `(' is not expected.
>
> The follwoing is what I used:
>
> #include <stdio.h>
>
> main()
> {
> long l=0x11223344;
> char *pt=(char*)&l;
>
> printf("%02x%02x%02x%02x\n",pt[0],pt[1],pt[2],pt[3]);
> }
[...]
If that's an actual cut-and-paste of your file, then your system is
broken. A cut-and-paste from your email compiles just fine here, so
the code as posted is correct.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list