0

what would happen if I implicitly casted the FIFO array to a structure that contains elements those elements are used to represe

I have a question and i need an answer to it /*if any expert would like to help 😅*/ Note: This is a C programming question ⁉️ *The situation is I'm having a FIFO (basically an array of eight uint32_t elements) this FIFO would be filled with data each piece of data has an identity (for example first piece of data is the id second piece of data is the size third piece is number of data packets and so on) *The question is, what would happen if I implicitly casted the FIFO array to a structure that contains elements those elements are used to represent the different data pieces at the array (would this permit me to access different data pieces from the array?). *If also anyone has an alternative way for what I want to achieve please feel free to share it with me. ☺️ Thank you.

29th Nov 2021, 9:24 AM
Ahmed Adel
Ahmed Adel - avatar
1 Odpowiedź
0
Sorry but I gotta say, I'm not understanding your explanation. I'm talking about the second paragraph, the part where it said "a structure that contains elements that are used to represent the data pieces at the array ..." Not even sure whether casting of the array to the structure was possible, let alone the "representing" part. Would you explain what the "representing" part was about? also it might help to understand, if you can save your code in SoloLearn, and share its link (for clarity sake) https://www.sololearn.com/post/75089/?ref=app
29th Nov 2021, 12:10 PM
Ipang