Re: question about memcpy()
- From: "Michael K. O'Neill" <MikeAThon2000@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 27 Apr 2006 11:27:16 -0700
"Ed Weir (ComCast)" <Anon@xxxxxxxx> wrote in message
news:bsydnTz9w9b0MdPZRVn-vQ@xxxxxxxxxxxxxx
"kathy" <yqin_99@xxxxxxxxx> wrote in message
news:1146006177.324850.224610@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Yes. You are right. No setting of /Zp in one project and another one
| has pack() setting.
|
| Could you explain why the first member of MAC_ADDR as a 6 byte array is
| problematic?
|
If default packing is 8, there will be two bytes slack...
I always use /Zp1.
- Ed.
I don't see that it's necessary to "always" use /Zp1. There are many
computations that are faster/more efficient if the default packing is used,
such that it's usually not necessry (or advisable) to compile the entire
project at /Zp1
You can force packings for particular structures that need them using the
"pack" #pragma:
#pragma (pack, temp_byte_packing, 1)
// your structures here
#pragma (pop, temp_byte_packing)
See http://msdn2.microsoft.com/en-us/library/2e70t5y1(VS.80).aspx
Mike
.
- References:
- question about memcpy()
- From: kathy
- Re: question about memcpy()
- From: Luke Alcatel
- Re: question about memcpy()
- From: kathy
- Re: question about memcpy()
- From: Ed Weir \(ComCast\)
- question about memcpy()
- Prev by Date: Re: Hidden CView
- Next by Date: Re: Messagebox not appearing
- Previous by thread: Re: question about memcpy()
- Next by thread: Re: question about memcpy()
- Index(es):
Relevant Pages
|