【问题标题】:'vector' in namespace 'std' does not name a type命名空间“std”中的“vector”未命名类型
【发布时间】:2013-05-27 22:06:21
【问题描述】:

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

【问题讨论】:

    标签: c++ std stdvector


    【解决方案1】:

    您应该包含vector 标头:

    #include <vector>
    

    【讨论】:

    • 找不到“矢量”文件,请您帮忙
    【解决方案2】:

    #include &lt;vector&gt;在我使用Clang时不起作用,我真的不知道这是C++版本或库的差异。

    #include &lt;set&gt; 可以解决问题。

    【讨论】:

    猜你喜欢
    • 2012-11-08
    • 1970-01-01
    • 2014-12-21
    • 2012-12-20
    • 2015-05-08
    • 1970-01-01
    • 1970-01-01
    • 2017-06-06
    • 2014-08-18
    相关资源
    最近更新 更多