I'm trying to create an array of b2Vec2 arrays using inline declaration. Right now I have...
NSMutableArray *array = [[NSMutableArray alloc] init];
b2Vec2 temp1[] = {
*new b2Vec2(1,1),
*new b2Vec2(0,0)
};
[array addObject:(id)temp1];
b2Vec2 temp2[] = {
*new b2Vec2(1,1),
*new b2Vec2(0,0)
};
[array addObject:(id)temp2];
b2Vec2 temp3[] = {
*new b2Vec2(1,1),
*new b2Vec2(0,0)
};
[array addObject:(id)temp3];
Is there any way I can get the temp1, temp2, and temp3 declaration inline with the addObject method call? Something like this...
[array addObject:<some inline array instantiation>];
[array addObject:<some inline array instantiation>];
[array addObject:<some inline array instantiation>];
Thanks!