Hi, I had a function like this, that wasn't within a class:
// Gets the maximum number of tracks displayable
const utils::uint32 GetConstMaxSystemRange()
{
return constMaxSystemNumber - constMinSystemNumber + 1;
}
It compiled fine in VS2005, but then I got linker errors for each file after the first one to include it, even though I was using Compile Guards. On a hunch, I surrounded it with a class like so:
class CDSLimitsAccess
{
public:
// Gets the maximum number of tracks displayable
static const utils::uint32 GetConstMaxSystemRange()
{
return constMaxSystemNumber - constMinSystemNumber + 1;
}
protected:
CDSLimitsAccess(){}
};
And bang! Fixed.
Question: WHY?