在 Qt 中使用 for 与 OpenCV3 时出错
error using for in qt with opencv3
>我从 Mitrocontrollers 获取源代码示例,以及更多关于使用 c++ 识别车牌的信息。但我发现了一些错误。例如,我在此代码中有错误:
for (auto &vectorOfMatchingChars : vectorOfVectorsOfMatchingCharsInScene) { // for each group of matching chars
PossiblePlate possiblePlate = extractPlate(imgOriginalScene, vectorOfMatchingChars); // attempt to extract plate
if (possiblePlate.imgPlate.empty() == false) { // if plate was found
vectorOfPossiblePlates.push_back(possiblePlate); // add to vector of possible plates
}
}
错误是":"标记之前的预期初始值设定项,输入末尾的预期主表达式,输入末尾的预期";"等。我必须怎么做才能解决这些错误?
你应该像这样修改你的 .pro ::
TEMPLATE = app
CONFIG += console c++14
CONFIG -= app_bundle
CONFIG -= qt
专注于 C++14。这将启用C++14版本。
由于我不知道您的 .pro 是什么样子,所以我在这里举了一个例子。
要启用 C++14,您需要专门添加以下行:
配置 += c++14
相关文章:
- 访问者访问变体并返回不同类型时出错
- 在Linux for Windows上编译C++代码时出错
- 读取文件的最后一行并输入到链接列表时出错
- 重载操作程序时出错>>用于类中的字符串 memebr
- 调用专用模板时出错"no matching function for call to [...]"
- C++-试图将函数指针推回到另一个CPP文件中的矢量时出错
- LINK 尝试使用 OpenSSL evp aes 256 c++ 时出错
- 在Google Kick start中提交时出错
- 在c++中访问int到类对象的映射时出错
- 分段错误当我试图运行程序时出错
- 使用dynamic_cast和构造函数时出错
- CHECK(调用)函数在Google Colab中出错
- 用pybind11包装C++抽象类时出错
- 为x86而非x64编译时出错
- 从R调用C++函数并对其进行集成时出错
- 这个函数哪里出错了
- 未在此作用域OpenCV3.4中声明cvSaveImage
- C++ 创建包含链表和字符串的对象的链接列表时出错
- 在 Qt 中使用 for 与 OpenCV3 时出错
- 在 Ubuntu 15.10 上使用 CUDA 构建 OpenCV3.1 时出错