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

OtagoHarbour picture OtagoHarbour · Jun 1, 2013 · Viewed 92k times · Source

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

Answer

taocp picture taocp · Jun 1, 2013

You should include the vector header:

#include <vector>