Answer the question
In order to leave comments, you need to log in
What could be the reason for a broken pointer in dynamic memory allocation?
Good day.
I ran into a situation I didn't understand.
There is a static array of pointers in a structure that is created dynamically:
typedef struct {
void * buf[100];
...
} QueueSteps ;
QueueSteps * m = (QueueSteps *) malloc(sizeof(QueueSteps));
if (m==null) { errorHandler(); }
Answer the question
In order to leave comments, you need to log in
Three of your two questions are answered yes, according to the standard of the language. Look for errors elsewhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question