Quote:Original post by theOcelot
Well obviously, you include foo.h and bar.h twice each, with a resulting four calls to GetID. My system doesn't change the fact that if you want to access variables from different .cpp's, you have to extern the variables, not declare them in a header file.
It's something that you might want to document if you formalise the system, because although it may be blidingly obvious to you, I didn't know that you were already aware of it (which is why I pointed it out) and it's something that most naive client code could trip up on - it would be nice to know the caveats involved in a particular system, explicitly stated.