开发者

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 **.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜