delorie.com/archives/browse.cgi | search |
Xref: | news-dnh.mv.net comp.os.msdos.djgpp:4168 |
Path: | news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!EU.net!news.eunet.fi!news.mdata.fi!usenet |
From: | @megabaud.fi |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Structure sizing problem |
Date: | 7 Jan 1996 12:55:17 GMT |
Organization: | DKS |
Lines: | 18 |
Message-ID: | <4cofrl$7d3@news.mdata.fi> |
Reply-To: | teemut AT megabaud DOT fi |
NNTP-Posting-Host: | walrus.megabaud.fi |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
I've used this structure in my previous Borland C++ program which I now like to convert to djgpp v2.beta4: struct main_directory_entry { char name[7]; unsigned long offset; unsigned long size; }; Borland C++ returns sizeof(main_directory_entry)=15 and djgpp returns 16, which causes little problems with file-reading routines... However when I tested sizeof(main_directory_entry.name) it returned 7 and unsigned longs returned 4. 7+4+4=15 isn't it? Have I missed some piece of information or is this a bug in compiler?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |