LeoVen

1

votes
3

answer
43

views

Is it possible to allocate structs on the stack with its definition hidden in a source file?

I have the following header file: struct StackList_s; typedef struct StackList_s StackList_t; // From here I add in the method signatures And the following source file: struct StackList_s { integer_t count; struct StackListNode_s *top; // Here begins the linked list // Some other members that store...
LeoVen
2

votes
2

answer
38

views

Initializing a void* buffer with calloc [duplicate]

This question already has an answer here: calloc() and NULL 2 answers So I've read the documentation for calloc and it says that it will initialize n objects of size size and initialize each of them to 0. So before making my implementation of a generic dynamic array in C I decided to make it with i...
LeoVen