Re: store contents of structure into an array
- From: "n00dle0@xxxxxxxxx" <n00dle0@xxxxxxxxx>
- Date: 31 Mar 2005 11:19:01 -0800
hi eric,
thanx for the suggestion, i was exactly looking for sth like that
only, though i never thought that i could do casting on the lhs also. i
do understand the issues raised by you. but i suppose if portability is
not a big issue, its quite okay to make such assumptions. so, if u take
a little care and define your structure such that you know that you
will not run into alignment problems then it okay, right?
as for what i am trying to do. well, primarily i was just bogged
down by this issue, for i knew that there ought to be a oneline
solution to getting this done, but i was not able to think of it
myself.
i am reading a SD card through a microprocessor. so, i basically
read data in chunks of 512 bytes into a buffer and dump them to a
structure so that i can easily acess the various fields in the data
which i was already able to do. but then i needed to make some changes
and put it back into the buffer, thats where i got stuck.
thanx again for the help, i was just not happy with the memcpy
solution, even though it was a oneliner.
regards,
ash
.
- Follow-Ups:
- Re: store contents of structure into an array
- From: Eric Sosman
- Re: store contents of structure into an array
- References:
- store contents of structure into an array
- From: n00dle
- Re: store contents of structure into an array
- From: Eric Sosman
- store contents of structure into an array
- Prev by Date: Re: need help..
- Next by Date: Re: execution time becomes unpredictable?!
- Previous by thread: Re: store contents of structure into an array
- Next by thread: Re: store contents of structure into an array
- Index(es):
Relevant Pages
|