c++ - 命名空间 'std' 中的“vector ”未命名类型

标签 c++ std stdvector

我正在 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 header :

#include <vector>

关于c++ - 命名空间 'std' 中的“vector ”未命名类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16868230/

相关文章:

c++ - C++ 字符串散列是对字符串还是内存地址进行散列?

c++ - std 字符串在类内部损坏

c++ - “数据”未在此范围内声明

C++验证数字并停止无限循环

c++ - 如何使用 OpenGL 在平面上投影点云?

c++ - 将大于数组中某个值的数字存储到另一个数组中

c++ - 如何从新插入的对(到 map )返回引用对?

c++ - 如何将 vector 列表存储为全局变量?

c++ - std::vector 作为模板函数参数

c++ - 删除存储在 std::vector 中的对象