"passing argument 1 of 'swap' makes pointer from integer without a cast
时间: 2024-05-24 08:13:22 浏览: 34
This error message typically occurs when you try to pass an integer value to a function that expects a pointer argument. The 'swap' function is likely expecting pointer arguments, but you are passing integer values instead.
To resolve this error, ensure that you are passing the correct type of arguments to the function. If the function expects pointer arguments, make sure you are passing pointers instead of integers. If you are unsure how to do this, review the function's documentation or seek help from a more experienced programmer.
相关问题
passing argument 1 of ‘strlen’ makes pointer from integer without a cast
这个错误通常是因为在调用 `strlen` 函数时,传递的参数不是字符串类型,而是整数类型。 `strlen` 函数需要一个以 null 结尾的字符串作为参数,以计算字符串的长度。可能的解决方法是检查传递给 `strlen` 函数的参数类型,并确保它是字符串类型。如果参数确实是整数类型,则需要将其转换为字符串类型,以便能够使用 `strlen` 函数。
passing argument 2 of 'treeWords' makes pointer from integer without a cast
这个错误通常是由于函数参数类型不匹配导致的。一般情况下,这个错误会在传递一个整数给期望一个指针类型的函数时发生。
你需要仔细检查一下你代码中的函数调用和函数声明,确保它们的参数类型和数量都是匹配的。还需要检查一下你传递给函数的参数是否正确。
如果你能提供更多的代码和错误信息,我可以为你提供更具体的帮助。