delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/14/05:17:58

Message-ID: <3764C915.E63E4D8D@accord-soft.com>
Date: Mon, 14 Jun 1999 14:49:17 +0530
From: Sunil V <sunilv AT accord-soft DOT com>
Organization: Accord Software & Systems Pvt. Ltd.
X-Mailer: Mozilla 4.5 [en] (Win95; I)
X-Accept-Language: en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: How does fwrite align ?
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.
--------------33B7D85430F01E5073CB8118
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello everybody,
I have observed that when I use something like fwrite(&XXX,
sizeof(struct X),  1, file_pointer);
in  a loop, the next record is not written immediately after the first
record. The next record is aligned to an int boundary ( that is what I
observed on my m/c, where in the size of int is 4 bytes). Is there a
hard and fast rule that dictates the way alignment has to be performed
or is it dependent on the compiler or the architecture of the machine ?

Please reply ASAP
Regards Sunil



--

--------------33B7D85430F01E5073CB8118
Content-Type: text/x-vcard; charset=us-ascii;
 name="sunilv.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Sunil V
Content-Disposition: attachment;
 filename="sunilv.vcf"

begin:vcard 
n:V;Sunil
tel;home:341 4609
tel;work:556 0136 / 138 / 105
x-mozilla-html:FALSE
org:Accord Software & Systems Pvt. Ltd.;Software Division
adr:;;;;;;
version:2.1
email;internet:sunilv AT accord-soft DOT com
x-mozilla-cpt:;-3328
fn:Sunil V
end:vcard

--------------33B7D85430F01E5073CB8118--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019