two instances of a static member, how could that be?

Viewed 1745

I have a multithreaded application. I declare a class with a static member in a shared library.

Printing the address of the member from different threads from different libraries shows different results.

//declaration

template <class OBJECT>
struct Container
{
   static int m_member;
};

template <class OBJECT>
int Container<OBJECT>::m_member;

// printing

cout << (void*) &Container<int>::m_member << endl;

How could that be?

1 Answers
Related