Re: Copying a struct to a larger struct?
- From: "Alexei A. Frounze" <alexfru@xxxxxxx>
- Date: Fri, 29 Jul 2005 00:56:03 +0400
"Barry Schwarz" <schwarzb@xxxxxxxxx> wrote in message
news:g7uge1pv97iu2j9faooaguv3234gafc8ok@xxxxxxxxxx
> On 27 Jul 2005 12:32:08 -0700, "hermes_917@xxxxxxxxx"
....
> There is no guarantee that the padding in the common part of the two
> structs is the same.
If my memory serves me, the standard gurantees that. But, I'd prefer to turn
that common part into a type used inside both structs. memcpy() will be able
to do bad things silently...
Alex
.
- Follow-Ups:
- Re: Copying a struct to a larger struct?
- From: Netocrat
- Re: Copying a struct to a larger struct?
- References:
- Copying a struct to a larger struct?
- From: hermes_917@xxxxxxxxx
- Re: Copying a struct to a larger struct?
- From: Barry Schwarz
- Copying a struct to a larger struct?
- Prev by Date: Re: Paasing global variables to functions
- Next by Date: Re: Paasing global variables to functions
- Previous by thread: Re: Copying a struct to a larger struct?
- Next by thread: Re: Copying a struct to a larger struct?
- Index(es):
Relevant Pages
|