18 42 C:\Users\TH8888\Desktop\未命名5.cpp [Error] no matching function for call to 'node::node(void*)'
时间: 2023-11-15 12:06:13 浏览: 51
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.
相关问题
44 75 C:\Users\Administrator\Documents\未命名1.cpp [Error] no matching function for call to 'animal::animal()'
这个错误是因为你在创建一个 `animal` 对象时,没有提供任何构造函数,因此编译器无法知道如何初始化对象。你需要在 `animal` 类中定义一个默认构造函数,例如:
```cpp
class animal {
public:
animal() {
// 在这里初始化对象的成员变量
}
// 其他函数声明
};
```
当然,如果你已经定义了其他构造函数,那么编译器将不会为你自动提供默认构造函数。在这种情况下,你需要显式地提供一个无参构造函数,或者使用其他构造函数来创建对象。
42 133 C:\Users\陈宗杰\Desktop\未命名1.cpp [Error] no matching function for call to 'Teacher::Teacher(int&, std::string&)'
这个错误信息表明在C++程序中,找不到一个名为`Teacher`的类的构造函数与带有`int`和`string`类型参数的函数调用匹配。你需要检查你的`Teacher`类的定义,确保它有一个这样的构造函数,且参数类型与你的函数调用匹配。如果你已经定义了这样的构造函数,请确保它的访问权限是公共的,并且在函数调用中输入的参数类型与构造函数中的参数类型一致。