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 functi
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/27 09:12:48
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 functi
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
怎么改?
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 functi
你的output里肯定是要打印一个结构体node*的,但是你把一个整型值比方说是a副职给他了,可以这么改用到a的地方改成 (struct node *)a