I have a function using a pointer to a pointer to a structure:
int function(struct_A ** mystructA);
It worked when i used it with my declared struct:
struct_A *mystructA;
function(&mystructA);
however, impossible to use my structure throught another structure:
struct struct_B{
struct_A *mystructA;
}
struct_B mystructB;
function( (&mystructB)->mystructA ); //this line cause me a segfault
I am struggling here, any idea where it could come from?
&(mystructB->mystructA)function( &(&mystructB)->mystructA );