title: How to assign pointer to global variable?
body: <p>I have to split up a command line argument in order to determine the file type.  In order to do this, I'm using </p>
  
  <pre><code>char fileName; //global variable, just below function prototypes
  
  char *fileType;
  
  fileType= strtok(inputFile, "."); //first string split
  fileName= (int) &amp;fileType; //store the file name for further use
  
  fileType= strtok(NULL, "."); //get the file type
  </code></pre>
  
  <p>The tokenizer function is working, but in the interest of keeping redundant code to a minimum, I want to store the filename, as I will have to create a new file with the same name, but different extension later on.</p>
  
  <p>In the debugger, the the fileName variable never gets used.  Why?</p>