title: How to declare a pointer with extern in C?
body: <p>I am writing a C software for a microcontroller, the compiler is Microchip MCC18.</p>
  
  <p>For test purposes, I have written a very simple program as follow:</p>
  
  <h2>.c file</h2>
  
  <pre><code>#include "x.h"
  
  char *now_clock;
  </code></pre>
  
  <h2>.h file</h2>
  
  <pre><code>extern char *now_clock;
  </code></pre>
  
  <p>With the above code I get a syntax error, but I don't know what is wrong. Any help?</p>