Declarations go in header files.
Definitions , however, need to go in a source file. Your variables listed are definitions. What you would typically do is also have a blah.cpp file. blah.cpp would look like:
#include "blah.h"CSettings theSettings;CLog theLog;bool bActive = true;
And blah.h would look like:
#ifndef _BLAH_H#define _BLAH_H#include "CSettings.h" //class containing CSettings (see below)#include "CLog.h" //similar, but this is for CLogextern CSettings theSettings;extern CLog theLog;extern bool bActive;#endif
[edit - darn, beaten by two people, as usual... At least I take up more space!
]
[edit - my edit maliciously removed closing/opening source tags...]
[edited by - Agony on May 19, 2004 6:02:02 PM]
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas only, and not for things themselves." - John Locke