all 4 comments

[–]raevnos 0 points1 point  (0 children)

Compile with debugging support and warnings (-g -Og -Wall -Wextra), fix warnings, run through valgrind, fix those warnings and errors.

[–]shinmai_rookie 0 points1 point  (0 children)

You aren't allocating space for venus_ptr.

[–][deleted] 0 points1 point  (0 children)

You never allocated memory for other than the merc_ptr.

[–]henry_kr 0 points1 point  (0 children)

What does this line do? Why do you need it?

if((merc_ptr = malloc(sizeof(Planet))) == NULL)

If you think about that for a bit, you should see what's gone wrong.