为了账号安全,请及时绑定邮箱和手机立即绑定

下面这个递归方法使用有错误么?

下面这个递归方法使用有错误么?

JustV 2016-09-23 19:19:58
public void RecursRender( TriTreeNode tri, int leftX, int leftY, int rightX, int rightY, int apexX, int apexY, GL10 gl )                  { if ( tri.LeftChild != null ) { int centerX = (leftX + rightX)>>1; int centerY = (leftY + rightY)>>1; RecursRender( tri.LeftChild,  apexX,   apexY, leftX, leftY, centerX, centerY, GL10 gl ); RecursRender( tri.RightChild, rightX, rightY, apexX, apexY, centerX, centerY, GL10 gl ); } else{ //省略,不是重点 } }//这里GL10 gl这个参数分别在定义时和迭代都调用合法么?事实上,eclipse报错了,提示GL10 cannot be resolved to a variable,应该如何修改
查看完整描述

1 回答

?
JustV

TA贡献3条经验 获得超1个赞

已经检查出错误了。。。在递归调用时,gl变量直接填变量名就行了,不该继续带着类型名!

查看完整回答
反对 回复 2016-09-23
  • 1 回答
  • 0 关注
  • 1237 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信