🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #15337

Re: probleem met structuur

#15337
From: Scorpion
Date: Sun, 15 Oct 2000 00:00
34 lines
1514 bytes
> > Ik heb volgende structuur:
> >
> > typedef struct {
> >  BYTE var1;
> >  DWORD var2;
> > } _test;
> >
> > Normaal gezien neemt deze structuur 5 bytes in beslag.
> > In VC6 neemt ze echter 8 bytes in beslag.
> > Na de eerste byte komen nog drie bytes waarschijnlijk om op een DWORD
uit
> te
> > lijnen?
> > Kan ik dit uitlijnen ergens uitzetten zodat deze structuur toch maar 5
> bytes
> > in beslag neemt?
> >
> > Thanks!
> >
>
> Met deze code is dat mogelijk:
>
> #pragma pack(push)
> #pragma pack(1)
>
>  typedef struct {
>   BYTE var1;
>   DWORD var2;
>  } _test;
>
> #pragma pack(pop)
>

Bedankt!
Technical Details
Message-ID: <A9mG5.31247$s31.493710@afrodite.telenet-ops.be>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <UljG5.29720$s31.471928@afrodite.telenet-ops.be> <3MlG5.19859$Z7.336199@nlnews00.chello.com>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: 107324,f57e95232f06f286
X-Google-Attributes: gid107324,public
X-Google-Thread: fcea4,f57e95232f06f286
X-Google-Attributes: gidfcea4,public
From: "Scorpion" <scorpion@nospam.be>
Subject: Re: probleem met structuur
Date: 2000/10/15
Message-ID: <A9mG5.31247$s31.493710@afrodite.telenet-ops.be>
X-Deja-AN: 681755199
References: <UljG5.29720$s31.471928@afrodite.telenet-ops.be> <3MlG5.19859$Z7.336199@nlnews00.chello.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300
X-Complaints-To: abuse@pandora.be
X-Trace: afrodite.telenet-ops.be 971632352 213.224.22.182 (Sun, 15 Oct 2000 19:52:32 MET DST)
Organization: Pandora - Met vlotte tred op Internet
X-MSMail-Priority: Normal
NNTP-Posting-Date: Sun, 15 Oct 2000 19:52:32 MET DST
Newsgroups: be.comp.programming,nl.comp.programmeren