I have a static library with the following code:
h file:
class Foo { public: Foo() { a = 4; } int a; }; class Bar { public: static const Foo foo; };
Cpp file:
const Bar::foo = Foo();
My problem is that bar :: foo is not initialized with a = 4 until some time after main (). Prior to this, a = 0. I am trying to access Bar :: foo from the DLL that is statically linking to the library above. And my application references this DLL, but does not have direct access to Bar :: foo. I am using Visual Studio 2008.
Does anyone know what might happen?
c ++
Matthew
source share