The pointer p
is not initialized. It doesn’t point to any storage.
Here you are trying to de-reference p and store the value from h
:
*p = h;
But p
doesn’t point to any valid storage to hold that value.
The pointer p
is not initialized. It doesn’t point to any storage.
Here you are trying to de-reference p and store the value from h
:
*p = h;
But p
doesn’t point to any valid storage to hold that value.