So this is my struct in a header file:
struct _Variable { char *variableName; char *arrayOfElements; int32_t address; }; typedef struct _Variable Var
You should pass &variable1 to your method. Operator & will take the address of your struct and that is what you need to assign to the pointer on variable.
&variable1
&
variable
Use:
Variable var1;
And then call the method:
initVariable(&var1, "variable1", "1, 2, 3", 4);