报错如下:
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
解决
时间: 2024-09-23 19:43:27