I keep getting an invalid initializer error in this line:
StackObject_t new = (StackObject_t*)malloc(sizeof(StackObject_t)); The StackObject_t type is defined as such:
typedef struct stackObject* pStackObject_t; typedef struct stackObject { void* obj; pStackObject_t next; } StackObject_t; 
StackObject_t *) to a thing (StackObject_t). Also, recommend not using the variable namenewbecause this is a reserved word in C++. This is fully legal in C, but it's a good habit to avoid C++ keywords just to make life easier if/when you step up to C++newas identifier is a good way to get a warning if you accidentally put it in a C++ compiler.