I'm doing some conversion of python to C code. I'm having quite a bit of problems converting what used to be linked lists in to C arrays.
In the python code, the programmer loves to declare an empty list, appending items while he iterates through some set of tasks, and return the list as a function's output. This causes me some trouble..
It's a bit of a pain to determine the size of the list before having to work with it, but the real trouble I'm having is managing the storage of these sizes. Should my function return the size of the array as well as a pointer to the array itself? Should I declare new structs which contain the array as well as the array's size?
Any advice is appreciated; I tend to think object oriented-ly, so this is all new to me