use of deleted function 'onnx::Value::Value(const onnx::Value&)' printf("Value = %d\n", *strideCoeff);是什么意思
时间: 2024-02-05 19:05:03 浏览: 26
这个错误通常是因为你试图复制一个被删除的函数的对象。在这种情况下,是因为在 ONNX 库中,`onnx::Value` 的复制构造函数被删除了,所以你不能直接复制 `onnx::Value` 对象。
至于你的代码中的 `printf` 函数,它的作用是将 `*strideCoeff` 的值打印出来,但是需要注意的是,`*strideCoeff` 的类型必须是 `int`。如果 `*strideCoeff` 不是 `int` 类型,你需要使用适当的格式说明符来打印它。
相关问题
use of deleted function 'SoftwareSerial::SoftwareSerial(const SoftwareSerial&)'
这个错误通常是因为 `SoftwareSerial` 类的拷贝构造函数被删除导致的。这意味着你不能直接使用拷贝构造函数来创建 `SoftwareSerial` 对象的副本。
要解决这个问题,你可以考虑使用指针或引用来操作 `SoftwareSerial` 对象,而不是直接创建副本。
另外,如果你正在使用的是 Arduino IDE 自带的 `SoftwareSerial` 库,请确保你使用了最新版本的库。有时旧版本的库可能存在一些已知的问题,升级到最新版本可能会解决这个问题。
如果问题仍然存在,请提供更多的代码上下文,以便我能够更好地帮助你解决问题。
use of deleted function ‘std::thread::thread(const std::thread&)’
"Use of deleted function ‘std::thread::thread(const std::thread&)’" 是一个编译错误,它表示你在尝试复制一个 `std::thread` 对象时出现了问题。这个错误的原因是 `std::thread` 类的拷贝构造函数被删除了,意味着你不能直接复制一个 `std::thread` 对象。
这个设计决策是因为 `std::thread` 对象代表了一个线程的执行实例,而线程是不可复制的。如果允许复制 `std::thread` 对象,可能会导致多个线程同时执行相同的代码,从而引发竞态条件和其他问题。
如果你想在多个线程之间共享数据,可以使用其他的同步机制,比如互斥锁(`std::mutex`)或原子操作(`std::atomic`)。另外,你可以通过移动语义来传递 `std::thread` 对象,即使用 `std::move()` 函数将一个 `std::thread` 对象从一个地方移动到另一个地方。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.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)