我得到这样的错误:C++类重定义错误帮助
FxMathFunctions.h: In function 'FxInt32 IMin(FxInt32, FxInt32)':
FxMathFunctions.h:13: error: redefinition of 'FxInt32 IMin(FxInt32, FxInt32)'
FxMathFunctions.h:15: error: 'FxInt32 IMin(FxInt32, FxInt32)' previously defined here
在FxMathFunctions.h我:
11: struct FxPoint2d;
12:
13: inline FxInt32 IMin(FxInt32 i1,FxInt32 i2)
14: {
15: if (i2 < i1) i1 = i2;
16: return i1;
17: }
FxInt32中,我包括头定义为:
typedef long FxInt32;
如果说FxInt32正在被重新定义,或者如果整个功能是我不能被错误决定。
我该如何解决这个问题?
UPDATE我在上面添加了行号。
FxMathFunctions.h的第13行和第15行是什么? – bdonlan 2010-06-23 04:29:53
这很奇怪。看起来行号有点向下移动了一点。 11-12行是什么? – bdonlan 2010-06-23 04:48:45
@bdonlan - 再次更新 – Elliot 2010-06-23 04:53:03