battleutils.cpp:1037: error: explicit qualification in declaration of 'int32 battleutils::AbilityBenediction(CBattleEntity*, CBattleEntity*)'
What does this error mean exactly?
The first line here is 1037 (in battleutils.cpp):
int32 battleutils::AbilityBenediction(CBattleEntity* PCaster, CBattleEntity* PTarget)
{
....
return blah;
}
In the header file under:
namespace battleutils
{
is this:
int32 AbilityBenediction(CBattleEntity* PCaster, CBattleEntity* PTarget);
The .cpp file correctly includes the header file.
}
, or didn't realize you already hadnamespace battleutils
in the cpp file. For example,namespace N { int f(); int N::f() {} }
gives the same error. In this case, the top answer's suggested fix ofnamespace N { int f(); namespace N { int f() {} } }
would hide the error message but actually define a different functionN::N::f
. I personally prefer to use the explicit qualification in my own code so that an error message is generated if the parameters don't match (instead of overloading or hiding the intended function).