Re: memcpy junk at beginning of buffer
- From: Artie Gold <artiegold@xxxxxxxxxxxxx>
- Date: Thu, 29 Dec 2005 15:02:02 -0600
Jeff wrote:
Im trying to memcpy a buffer from a filled in simple structure. When I memcpy and then print the resulting buffer, I see 7 locations that have junk before my data starts. My data structure is:
struct command_pkt { char command_num[3]; char command[100]; };
typedef command_pkt COMMAND;
Huh? There's a type called `struct command_pkt' but not one (that *we* can see, anyway) called `command_pkt'.
This is why we say POST REAL CODE (cut'n'paste).
[snip]
HTH, --ag -- Artie Gold -- Austin, Texas http://goldsays.blogspot.com (new post 8/5) http://www.cafepress.com/goldsays "If you have nothing to hide, you're not trying!" .
- Follow-Ups:
- Re: memcpy junk at beginning of buffer
- From: Keith Thompson
- Re: memcpy junk at beginning of buffer
- References:
- memcpy junk at beginning of buffer
- From: Jeff
- memcpy junk at beginning of buffer
- Prev by Date: Re: Checking memset
- Next by Date: Re: warning : no new line at end of file
- Previous by thread: Re: memcpy junk at beginning of buffer
- Next by thread: Re: memcpy junk at beginning of buffer
- Index(es):
Relevant Pages
|