命名空间'std'中的'vector'不命名类型

'vector' in namespace 'std' does not name a type

本文关键字:类型 中的 std 命名空间 vector      更新时间:2023-10-16

我正在Debian 7.0.0上使用CodeBlocks 10.05开发一个C++应用程序。

出于某种原因,以下代码

#include <iostream>
std::vector< int > delaunayDiv(const std::vector< int <T> > & vP, cv::Rect boundRect,
    std::vector<int>& triangles, int& numTriangles, bool lookRight);

返回以下错误

error: 'vector' in namespace 'std' does not name a type

您应该包括vector标头:

#include <vector>

#include <vector>在我使用Clang时不起作用,我真的不知道这是否是C++版本或库中的差异。

#include <set>起作用。