I created a structure like this
typedef struct Node {
NSString* Description;
NSString* AE;
NSString* IP;
NSString* Port;
} Node;
I need to create NSMutableArray of this Node structure I need to know how create object of node path it to the NSMutableArray retrieve it and read for example the port.
You can only store Objective-C objects in an
NSMutableArray.One route you can take is to use a standard C array:
Another route is to wrap the structure in an Objective-C object:
Then, you’d add
NodeWrapperobjects to yourNSMutableArraylike this:To retrieve the
Nodefrom theNodeWrapper, you’d simply do this:or