title: Adding char string into sprintf
body: <p>I'm programming a PIC for some temp sensing. The final output is sent via UART to a PC. The MSB of the temperature sensor ID is used to determine where the sensor is located.</p>
  
  <p>I've just added the guilty chunk of the code I'm using (no point boring u with the rest). The issue is with the location[] char I'm using. I've tried it a few ways (*location, location[7]), but most fail to compile. The way below does compile, but nothing is displayed in the %s after "Location=". I also tried %c, but still nothing was displayed. </p>
  
  <pre><code>void convert_1820_send_temp(int *buff)
  {
    // have removed other variables
    char location[];
  
    // Determine location based on sensor id
    if (dev_adr[7] == 181)
    {
      strcpy(location, "outside");
    }
    if (dev_adr[7] == 30)
    {
      strcpy(location, "ceiling");
    }
    if (dev_adr[7] == 46)
    {
      strcpy(location, "under  ");
    }
    if (dev_adr[7] == 18)
    {
      strcpy(location, "inside ");
    }
    else
    {
      strcpy(location, "unknown");
    }
    sprintf(s,
        "Temp=%c%d.%d degrees C, sensor=\"%d %d %d %d %d %d %d %d\",Location=%s\r\n",
        negSign, tempWhole, decimal, dev_adr[7], dev_adr[6], dev_adr[5],
        dev_adr[4], dev_adr[3], dev_adr[2], dev_adr[1], dev_adr[0]), location;
  
    USARTWriteString(s);
  }
  </code></pre>
  
  <p>Any help would be great thanks.</p>