case 2:{ if(h==-1) nodata(); else output(h);break; }

踩ll黑代言ll2022-10-04 11:39:541条回答

case 2:{ if(h==-1) nodata(); else output(h);break; }
:vc++lianbiao.cpp(154) :error C2664:'output' :cannot convert parameter 1 from 'int' to 'struct node *'
Conversion from integral type to pointer type requires reinterpret_cast,C-style cast or function-style cast
怎么改?

已提交,审核后显示!提交回复

共1条回复
sds0433 共回答了22个问题 | 采纳率90.9%
你的output里肯定是要打印一个结构体node*的,但是你把一个整型值比方说是a副职给他了,可以这么改用到a的地方改成 (struct node *)a
1年前

相关推荐

大家在问