Re: [Dev-C++] Shift operators portability
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2003-09-23 11:15:35
|
The AMD is same as Intel, or it wouldn't run x86 code.
/Per W
On Tue, 23 Sep 2003, Neszt Tibor wrote:
> > I have an AMD processor and no idea if it's big or little endian.
>
> main() {
> int x = 1;
> if (*(char *)&x == 1) {
> printf("little-endian\n");
> } else {
> printf("big-endian\n");
> }
> }
>
>
> Regards,
> Neszt Tibor
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|