[Error] cannot convert 'int (*)[200]' to 'int*' for argument '1' to 'void put(int*, int, int)'
时间: 2023-03-27 10:01:27 浏览: 169
这是一个编程问题,我可以回答。这个错误是因为函数 put() 的第一个参数应该是一个指向 int 类型的指针,但是传入的却是一个指向 int 数组的指针,导致类型不匹配。需要将参数改为 int 数组的首地址即可。
相关问题
[Error] cannot convert 'int*' to 'PHtTree* {aka HtTree*}' for argument '1' to 'void huffmancodes(PHtTree*, int*, int*, int)'
这个错误是因为你尝试将一个指向`int`类型的指针转换为指向`HtTree`类型的指针,而这是不允许的。
可能的原因是你在调用`huffmancodes`函数时传递了错误类型的参数。请检查你传递给`huffmancodes`函数的第一个参数是否是指向`HtTree`类型的指针,如果不是,请更正该参数。
另外,也请确保你的代码中已经正确定义了`PHtTree`和`HtTree`类型。
[Error] cannot convert 'char*' to 'int*' for argument '2' to 'void addUser(char*, int*, int)'
This error message is indicating that there is a problem with the data types of the arguments being passed to the function `addUser`. The second argument is expected to be a pointer to an integer (`int*`), but instead a pointer to a character (`char*`) is being passed.
To resolve this error, you need to make sure that the second argument passed to `addUser` is a pointer to an integer. If you intended to pass a string as the first argument, you may need to update the function definition to accept a `char*` instead of an `int*`.
阅读全文