I need to dynamically allocate array of structs and perform some operations on it, then deallocate the memory. When I try to deallocate memory like that
for (int i = 0; i < booksAmount; i++) {
free(myArray[i])
}
Here is the link to code
https://repl.it/@Xyrolle/Structures
I need to make so printList function will not print books array after deallocation.
Also, do you have any suggestions on how to manage memory more efficiently?
Thank you.