转载自:http://blog.csdn.net/longshengguoji/article/details/8307400
报错如下:
BaseSmoothingAlgorithm.h:4:7: error: redefinition of ‘class BaseSmoothingAlgorithm’
BaseSmoothingAlgorithm.h:4:7: error: previous definition of ‘class BaseSmoothingAlgorithm’
排错步骤:
1.查找类的定义后面是否少类“;”;一一查找后发现有,不是该类型的错误
2.少了防止被多次包含的宏,果真如此,修改如下
#ifndef _BASESMOOTHINGALGORITHM_H_
#define _BASESMOOTHINGALGORITHM_H_
#include "BaseSmoothingAlgorithm.h"
#endif
解决