I have a C struct that contains a pointer, all defined in a C header:
struct testA {
int iSignal;
struct testB *test;
};
struct testB {
int iPro;
};
Then I have a Swift program to initialize an instance of this struct:
var a = testA()
var b = testB()
a.test = &b // this line error
But I get the following error:
'&' used with non-inout argument of type 'UnsafeMutablePointer<testB>'
Can anyone help?