阅读222 返回首页    go 阿里云 go 技术社区[云栖]


C++ ERROR redefinition of ‘class ***’

报错如下:

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

解决

最后更新:2017-04-04 02:25:10

  上一篇:go java操作XML中的占位符
  下一篇:go 娱乐圈中20大黑帮事件