命名空间“ std”中的“ Vector”不命名类型

我正在 Debian 7.0.0上使用 CodeBlock 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
114678 次浏览

You should include the vector header:

#include <vector>

#include <vector> does not worked when I use Clang, I do not really know if it is a difference in C++ versions or libraries.

#include <set> does the trick.