首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

请问 :int grx = gActor.state == 0 ? gActor.gx : gActor.nx; 是把哪个的值赋给 grx 啊多谢

2012-02-13 
请教 :int grx gActor.state 0 ? gActor.gx : gActor.nx 是把哪个的值赋给 grx 啊?谢谢!请教:intgrx

请教 :int grx = gActor.state == 0 ? gActor.gx : gActor.nx; 是把哪个的值赋给 grx 啊?谢谢!
请教   :
int   grx   =   gActor.state   ==   0   ?   gActor.gx   :   gActor.nx;  

到底是把哪个的值赋给   grx   啊?

谢谢!


[解决办法]
if (gActor.state == 0) grx = gActor.gx ;
else grx = gActor.nx;

热点排行