From: "Greg Wellenius" Newsgroups: comp.os.msdos.djgpp Subject: big-endian and little endian binaries Date: Sat, 15 Jan 2000 21:51:41 -0500 Organization: Harvard University Network Operations Center Lines: 16 Message-ID: <85reog$bqi$1@plato.harvard.edu> NNTP-Posting-Host: 12.6.221.159 X-Trace: plato.harvard.edu 947994192 12114 12.6.221.159 (16 Jan 2000 03:43:11 GMT) X-Complaints-To: usenet AT harvard DOT edu NNTP-Posting-Date: 16 Jan 2000 03:43:11 GMT X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello, Any ideas on how, in C++, I might be able to write big-endian numbers (2-byte ints in this case) to a binary file when I'm on a machine that uses little-endian format? Might there be a special way to open the output file so that numbers are written as big-endian? Thanks in advance, Greg gwelleni AT hsph DOT harvad DOT edu