i am getting the compile error:
Error 7 error C2084: function ‘Boolean
IsPointInRect(…)’ already has a body
on my inline function, which is declared like this in a cpp file:
inline Boolean IsPointInRect(...)
{
...
}
i have exactly the same function in another cpp file. might this be causing the problem? how can i solve it?
As litb and AndreyT point out, this answer doesn’t address the actual problem – see litbs answer for details.
While
static, as Ofir said, gives you internal linkage, the “C++ way” is to use unnamed namespaces:§7.3.1.1/1:
§7.3.1.1/2 adds: