request for member ‘send’ in ‘((NwDiagRPC*)this)->NwDiagRPC::mRpcApp’, which is of non-class type ‘void*’
时间: 2024-05-14 09:18:14 浏览: 15
这个错误通常是因为编译器无法确定 `mRpcApp` 的类型,因为它被声明为 `void*`,而 `void*` 是一个无类型指针,编译器无法确定它所指向对象的类型。
这种情况下,你需要将 `mRpcApp` 的类型确定下来,例如:
```cpp
class NwDiagRPC {
public:
// 假设 mRpcApp 是一个指向某个类实例的指针
MyClass* mRpcApp;
// ...
};
// 然后在使用 `mRpcApp` 的地方,可以这样转换类型
MyClass* app = static_cast<MyClass*>(mRpcApp);
app->send(data);
```
当然,这里的 `MyClass` 只是一个示例,你需要将其替换成实际的类型。
相关问题
[Error] request for member 'name' in 'current->DoubleNode::data', which is of non-class type 'EType {aka char}'
This error message indicates that you are trying to access a member called 'name' in a variable called 'current->data', which is of type 'EType' (possibly a typedef for 'char'). This is not allowed because 'EType' is not a class or struct type that has a member named 'name'.
To fix this error, you need to either change the type of 'current->data' to a class or struct type that has a 'name' member, or access a different member that is actually present in the 'EType' type.
error: request for member ‘at’ in ‘((yolo*)this)->yolo::imgs_buffer’, which is of non-class type ‘std::vector<cv::Mat> [1]’ cv::Mat imge = imgs_buffer.at(b);
这个错误提示表明你试图在一个指针类型的对象((yolo*)this)中访问一个非类类型(std::vector<cv::Mat>[1])的成员,因为这个指针类型的对象没有成员函数at(),所以编译器出现了错误。
可能的原因是你没有正确地定义或者初始化这个指针类型的对象。请检查代码中与这个对象相关的部分,看看是否有错误或者遗漏。
另外,这个错误提示中提到的变量名为yolo::imgs_buffer,而你在代码中使用的是变量名为imgs_buffer。请确保变量名的正确性,避免因为拼写错误导致代码出现问题。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)