I have a structure in C that contains an array on which I perform stack operations.
If the stack is full, I need to prevent the element from being clicked at the end of the array and return an error condition.
Is it better to include the stack size as a structure element and pass that number of elements to the stack_push () function, or should I have a watch element at the end of the stack array?
source
share