title: making a global struct pointer available to multiple source files
body: <p>I have a struct declared in a header file called <code>h1.h</code> that included in two source files, <code>c1.c</code> and <code>c2.c</code>.</p>
  
  <pre><code>typedef struct
  {
      char binary_filename[256];
  }programming;
  </code></pre>
  
  <p>I want to create two variables of this struct, <code>device1</code> and <code>device2</code> and then declare two pointers to each of these variables, <code>programmingPtr1</code> and <code>programmingPtr2</code>.</p>
  
  <p>I want to be able to access the member, <code>binary_filename</code> of a instance in each of the source files.</p>
  
  <p>I'm confused as to where I should declare these variables and pointers.</p>
  
  <p>Should I declare the variables as <code>extern</code> in the header? </p>
  
  <p>I read <a href="https://stackoverflow.com/questions/16970288/creating-a-global-struct-for-multiple-source-files">this post</a> but it doesn't deal with pointers to variables.</p>
  
  <p>Could someone advise please as to the best method?</p>