Hello. I couldn't find a good answer to this question, so I thought I might ask it here. I am trying to get the length of an array of structs automatically (how many structs there are in the array). Is there an easy way to do it?
Thank you!
Well, I first declared a structure single_card, then I used single_card cards[3] to declare the array. Then I tried to pass it into a function, so something like:
1 2 3
void get_card(single_card cards[]) {
...
}
Now I would like to use the length of the array... get it automatically, I guess.
Thanks!