74

I am developing a C++ application using CodeBlocks 10.05 on Debian 7.0.0.

For some reason, the following code

#include <iostream>

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

returns the following error

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

2 回答 2

159

You should include the vector header:

#include <vector>
于 2013-06-01T01:39:55.130 回答
-1

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

#include <set>成功了。

于 2017-03-15T19:49:10.967 回答