78

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

2 Answers 2

167

You should include the vector header:

#include <vector>
1
  • I am getting 'vector' file not found, can you please help out
    – Yuyutsu
    Jun 24, 2020 at 9:39
0

#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.

2

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.