This one is driving me crazy! I have a structure:
typedef struct{
int a;
}myStruct;
Then I:
myStruct tempStruct;
I am trying to pass a structure to a class method whose implementation:
- (void) myFunc:(struct myStruct)oneOfMyStructs{};
I call the method as follows:
[myClass myFunc:(struct myStruct)tempStruct]
The compiler complains about the "Convert to non-scalar type" request. All I want to do is pass the structure to the class method, but the syntax is a bit confusing to me. I am new to Objective-C. Please let me know if you see where I am wrong. I also could not follow the link, so if you could help me with this, that would be great!
Thank!
source
share