閱讀222 返回首頁    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大黑幫事件