box2d var access from diff class in iphone using c++
i have a car.h
now inside the car.h i did
开发者_StackOverflow社区float cc;
void Step(Settings* settings)
{
Test::Step(settings);
cc=m_rightWheel->GetWorldCenter().x;// cc hold wheel value i needs this in other class
}
now i want to access the value of cc in other class , so i did
// in VC.h
Car car;
// in VC.m
NSLog(@"car is moving at %f",car.cc );// not working
NSLog(@"car is moving at %f",car->cc );// not working
how to get the value of cc here ??
**cc=m_rightWheel->GetWorldCenter().x
looks weird. Remove the **
.
精彩评论