[Error] cannot convert 'char**' to 'char*' for argument '2' to 'void decodeFile(char*, char*, int)'
时间: 2023-12-28 07:06:13 浏览: 210
这个错误通常是因为函数需要一个 `char*` 类型的参数,但是你传递了一个 `char**` 类型的参数导致的。
要解决这个问题,你需要确定你的函数的参数类型,并确保你传递的参数类型与函数所需的参数类型相匹配。如果你是在调用一个已经存在的函数,你需要查看函数的文档或源代码以了解正确的参数类型。
如果你是在编写一个新的函数,你需要检查函数定义并确保参数类型与函数所需的参数类型相匹配。如果你的函数需要一个指向指针的指针作为参数,那么你需要传递一个指向指针的指针。否则,你需要传递一个指向字符数组的指针。
相关问题
[Error] cannot convert 'char*' to 'int*' for argument '2' to 'void addUser(char*, int*, int)'
This error message suggests that there is a function called 'addUser' that expects its second argument to be a pointer to an integer, but instead it is being passed a pointer to a character.
To resolve this error, you need to make sure that the second argument passed to 'addUser' is a pointer to an integer, not a character. You can also check the function definition to make sure that the parameter types match.
[Error] cannot convert 'char**' to 'char*' for argument '1' to 'MinHeapNode* buildHuffmanTree(char*, int*, int)'
这个错误通常表示你在函数参数传递时类型不匹配。具体来说,你的函数 `buildHuffmanTree` 接收的第一个参数应该是一个 `char*` 类型的指针,而你传递给它的是一个 `char**` 类型的指针。
这可能是因为你在调用 `buildHuffmanTree` 函数时,传递给它的参数是一个指向指针的指针。你需要检查一下你的代码,看看是不是在传递参数时出了问题。如果是,你需要将传递给 `buildHuffmanTree` 函数的第一个参数改为一个指向字符数组的指针,而不是指向指针的指针。
如果你需要传递一个指向指针的指针,你可以在函数内部进行解引用,将其转换为指向字符数组的指针。
阅读全文
相关推荐














