Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/19/03 14:09
Read: times


 
#43768 - RE: Pointers to Structure Elements
Responding to: ???'s previous message
Andy Neil wrote:
-------------------------------
Alternatively, you could use a union consisting of your structure and a char array.


I would go this way because when you fill the array with your received data all structure elements would be filled automatically and you can refer to them by name without worries.
Same goes when you want to transmit the structure, you fill your structure data and transmit the char array without worrying about positioning of the data.
Make sure that you use byte alignment in compile options if you are using PC otherwise your data would be wrong.
Regards
Mahmood


List of 12 messages in thread
TopicAuthorDate
Pointers to Structure Elements            01/01/70 00:00      
   RE: Pointers to Structure Elements            01/01/70 00:00      
   RE: Pointers to Structure Elements            01/01/70 00:00      
   RE: Pointers to Structure Elements            01/01/70 00:00      
      RE: Pointers to Structure Elements            01/01/70 00:00      
   RE: Pointers to Structure Elements            01/01/70 00:00      
      RE: Pointers to Structure Elements            01/01/70 00:00      
         RE: Pointers to Structure Elements            01/01/70 00:00      
   RE: Pointers to Structure Elements            01/01/70 00:00      
   RE: Pointers to Structure Elements            01/01/70 00:00      
   Universal casting to structs/union/void            01/01/70 00:00      
      RE: Universal casting to structs/union/void            01/01/70 00:00      

Back to Subject List