Answer the question
In order to leave comments, you need to log in
free and const
Faced with the following situation. There is a pointer (void *) which is subsequently freed via free()
struct {
void *value;
....
};
...
// Присваивается указатель на какое-нибудь значение
node->value = value;
...
free(node->value);
Answer the question
In order to leave comments, you need to log in
void free(void * ptr);
void free(const void * ptr);
if node->value assign pointer to const variable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question