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

学习 时间:2026-04-08 02:05:30 阅读:3978
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怎么改?

最佳回答

现实的枕头

怕孤单的海燕

2026-04-08 02:05:30

你的output里肯定是要打印一个结构体node*的,但是你把一个整型值比方说是a副职给他了,可以这么改用到a的地方改成 (struct node *)a

最新回答共有2条回答

  • 失眠的猎豹
    回复
    2026-04-08 02:05:30

    你的output里肯定是要打印一个结构体node*的,但是你把一个整型值比方说是a副职给他了,可以这么改用到a的地方改成 (struct node *)a

上一篇 万户飞天 读后感读《千年梦圆在今朝》的读后感,或是读了万户飞天的故事的读后感也可!谢谢!

下一篇 Thomas is crying.the teacher asks him