How to correctly definde a global struct variable?
<p>In <code>file1.c</code> I have :</p>

<pre><code>struct node
{
    int key;
    jobPtr jobX;
    struct node *next;
};

struct node *head = NULL;
void method()
{
 ...
}
</code></pre>

<p>I want to use <code>head</code> pointer in <code>file2.c</code>. So I add into header file <code>headerX.h</code>:</p>

<pre><code>extern struct node *head;
</code></pre>

<p>In <code>file2.c</code> I do this:</p>

<pre><code>struct node *head;
int main() {

}
</code></pre>

<p>But in <code>file2.c</code> I can't use <code>head</code>. What have I done incorrectly?</p>

<p><strong>UPD</strong></p>

<p>I removed <code>struct node *head</code> in file2.c file but I can't still use <code>head</code> pointer. My IDE allows me to type <code>head</code> in file2.c but when I want to call elements of <code>structure</code> IDE gives me <code>no suggestions for members of struct node *</code>.</p>