Initialize a static Pointer results in <undefined value>
<p>I have a merely beginners problem with Pointers in managed C++ that gives me headache. I am creating a list of elements and a pointer should show the current element of this list.</p>

<p>The Problem is, when I assign the first element to this list, I want to reference the beginning of this list with my pointer ("varPointer = &amp;firstElem"). But after that, the pointer has no value at all.</p>

<p>Here's a simplified version of my code:</p>

<pre><code>ref class ElementClass
{
public:
    value struct Element
    {
        //some items here ...;
        Element *Next, *Previous;
    };
    ...
}

ref class Queue
{
 public:
      static Element* queue;

      static void AddElem(Element* elem)    {
        //Check, if queue is empty
        if (queue == nullptr) {
            queue = elem;
            queue-&gt;Previous = nullptr;
         }
         else {             
            queue-&gt;Next = elem;
            elem-&gt;Previous = queue;
            queue = elem;           
         }
    }
}
</code></pre>

<p>The Programs does not throw any error and in the next iteration the list seems still empty. 
Even if I initialize queue explicitly with "static Element* queue = 0" or something the queue-Pointer always has . Initialize with an instance of "Element" is not possible ("a value of type 'interior_ptr' cannot be used to initialize an entity of type 'Element *'). For this I added:</p>

<pre><code>...
public:
    static Element^ tmpElem = gcnew Element();
    static Element* queue = &amp;tmpElem;
...
</code></pre>

<p>The program never uses the else-statement.
I appreciate any kind of help. Thank you all in advance.</p>

<p>(I am familiar with programming in general, but I am new to C++ by the way.)</p>