I am currently trying to get the length of a dynamically generated array. It is an array of structs:
typedef struct _my_data_ { unsigned int id; double
If you need to know the size of a dynamically-allocated array, you have to keep track of it yourself.
The sizeof(arr) / sizeof(arr[0]) technique only works for arrays whose size is known at compile time, and for C99's variable-length arrays.
sizeof(arr) / sizeof(arr[0])