【已解决】error: call of overloaded ‘abs(unsigned int)’ is ambiguous
问题描述:error: call of overloaded ‘abs(unsigned int)’ is ambiguousunsigned int dist = abs(goal_x - tmp_goal_x) + abs(goal_y - tmp_goal_y);解决办法:修改为:unsigned int dist = abs(int(goal_x - tmp_goal_x)) + abs(
·
问题描述:
error: call of overloaded ‘abs(unsigned int)’ is ambiguous
unsigned int dist = abs(goal_x - tmp_goal_x) + abs(goal_y - tmp_goal_y);
解决办法:
修改为:
unsigned int dist = abs(int(goal_x - tmp_goal_x)) + abs(int(goal_y - tmp_goal_y));
更多推荐
所有评论(0)