I have a cpp class like that..
class MyContactListener : public b2ContactListener
{
int countContact;
///this is an objective c class...
HelloWorld *hel;
public:
void EndContact(b2Contact* contact)
{
///initialize objective c object
hel=[[HelloWorld alloc] autorelease];
///call objective c method.........
[hel beginContact];
}
};
inside cpp class i call a objective c method.the objective c method looks like..
-(void )beginContact
{
shakeCounter++;
[_label setString:[NSString stringWithFormat:@"%d",shakeCounter]];
}
The objective c method get called....and also the variable shakeCounter increased.....but _label string is not updated...._label is initialized properly and work properly if i called the objective c method from objective c class using self....
Can anyone help???