I am trying to work out a double pointer to a structure in C and cannot figure out what is going wrong... The simple source is below:
typedef struct
{
in
You received a segfault because you did not allocate a struct.
The value of data is garbage, so it is pointing to some place in memory that is not owned by your process, or is otherwise inaccessible.
You need to first allocate an object of type mystruct. Here is a working example for you: http://ideone.com/XIdJ8