True, but I was getting the impression that when I am done calling grow then returning back to whatever function called it, the memory will no longer be pointed to by the items pointer. That is how I...
Type: Posts; User: camel-man
True, but I was getting the impression that when I am done calling grow then returning back to whatever function called it, the memory will no longer be pointed to by the items pointer. That is how I...
struct Stack
{
int top;
int capacity;
ItemT *items;
};
void pushStack(StackP stack, ItemT item)
{
Ok thank you guys, apparently I have been thinking all wrong about pointers and heap memory, Ill have to let this soak in my small brain haha
A pointer is passed to a function, the data the pointer is pointing to is changed, then the actual address that the pointer holds is changed. After the function returns, the data the pointer points...