19 36 C:\Users\17717\Desktop\未命??.cpp [Error] no matching function for call to 'max(int [1010], int*)'
时间: 2024-04-23 14:29:02 浏览: 17
这个错误是因为你调用了一个名为 'max' 的函数,但参数不匹配。根据错误信息,max函数的第一个参数是一个大小为1010的整型数组,第二个参数是一个指向int类型的指针。
首先,确保你的代码中定义了 max 函数,并且它接受正确的参数类型。其次,检查函数调用的地方,确保传递的参数与函数定义一致。如果函数定义和调用都正确,但仍然出现这个错误,可能是因为函数声明没有包含在调用之前。
如果你能提供更多的代码细节,我可以帮助你更具体地解决这个问题。
相关问题
c++19 8 C:\Users\pc\Desktop\大作业1.cpp [Error] no matching function for call to 'student::student(int)'
这个错误的原因是在你的代码中,没有定义一个接受一个整数作为参数的 `student` 构造函数。可能是你在创建 `student` 对象时传入了一个整数参数,但是没有对应的构造函数可以处理这个参数。你可以考虑添加一个带有一个整数参数的构造函数来解决这个问题。例如,你可以在 `student` 类的定义中添加以下代码:
```cpp
class student {
public:
student(int id) {
// 构造函数体
}
// 其他成员变量和成员函数的定义
};
```
当然,具体的构造函数实现需要根据你的需求来进行调整。希望这能帮助到你解决问题!如果还有其他问题,请随时提问。
18 42 C:\Users\TH8888\Desktop\未命名5.cpp [Error] no matching function for call to 'node::node(void*)'
This error message is indicating that there is no constructor for the class "node" that takes a "void*" parameter. This means that there is likely a line of code that is attempting to create a new instance of the "node" class using a "void*" as the argument, but this is not a valid argument type for the constructor.
To fix this error, you will need to modify the line of code that is creating the new "node" instance to use a valid argument type for the constructor. If you are unsure what the correct argument type should be, you may need to review the documentation for the "node" class or consult with other members of your development team.
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)