//.HPP class NOISE { public: virtual double next() = 0; }; class UNIFORM_NOISE: public NOISE { double L, R; std::default_random_engine generator; std::uniform_real_distribution distribution; public: UNIFORM_NOISE(double _L, double _R); double next(); }; class NORMAL_NOISE: public NOISE { double m, s; std::default_random_engine generator; std::normal_distribution distribution; public: NORMAL_NOISE(double _m, double _s); double next(); }; //.CPP UNIFORM_NOISE::UNIFORM_NOISE(double _L, double _R): L(_L), R(_R) { distribution = std::uniform_real_distribution(L, R); } double UNIFORM_NOISE::next() { return distribution(generator); } NORMAL_NOISE::NORMAL_NOISE(double _m, double _s): m(_m), s(_s) { distribution = std::normal_distribution(m, s); } double NORMAL_NOISE::next() { std::cout <<"gening" < > generate(const cv::Mat &rvec, const cv::Mat &tvec, int N, NOISE noise) //ERROR In file included from /home/other_file:1:0: /home/other_file:35:117: error: cannot declare parameter ‘noise’ to be of abstract type ‘NOISE’ std::vector< std::pair > generate(const cv::Mat &rvec, const cv::Mat &tvec, int N, NOISE noise);