c++ - 使用vector没有头文件为啥不报错?
黄舟
黄舟 2017-04-17 13:05:02
0
4
557

include <opencv2/opencv.hpp>

include <iostream>

include <cassert>

include <cmath>

include <fstream>

using namespace std;
using namespace cv;

C++程序,使用了opencv,上面是头文件和命名空间,程序里有vector,为啥不报错,能正常编译运行?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(4)
伊谢尔伦

Because OpenCV has cv::vector…

巴扎黑

does not exist. .

左手右手慢动作

There should be code similar to this in opencv

include <vector>

namespace cv {
using std::vector;
}

小葫芦

You are using cv::vector, not std::vector

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!