title: Trying to add null character to end of a char array before strcpy
body: <p>Working on a problem where I have to read data from a file into a struct using .</p>
  
  <p>The file is organized so that there is a name, a few lines of ASCII art terminated by a # and a rating. Here is an example</p>
  
  <pre><code>Sample Name
  ( S )
  ( S )
  # 5
  </code></pre>
  
  <p>I have my struct set up like this:</p>
  
  <pre><code>typedef struct
   {
     char* name;
     char* art;
     int rating;
   }CASE;
  </code></pre>
  
  <p>When I compile my source, I keep getting the following warnings:</p>
  
  <pre><code>multiple-character character constant
  overflow in implicit constant conversion
  </code></pre>
  
  <p>on this line <code>buffer[artCount] = '/0';</code> where artCount is strlen of the buffer itself.</p>
  
  <p>I'm simply adding a null character to the end of a character array to prepare for a strcpy. Is there something wrong with my logic here? </p>
  
  <p>function:</p>
  
  <pre><code>/*CASE* all is an empty array of CASE structs*/
  void readFile(FILE* FPin, CASE* all)
  {
    CASE* walker = all;
    int count = 0;
    int artCount;
    char buffer[160];
  
    if((FPin = fopen("art.txt", "r")) == NULL)
    {
      printf("Error opening file.");
      exit(100);  
    }
  
   walker-&gt;name = (char*)malloc(sizeof(char)*100);
  
   /*Reads in the name*/
   while(fgets(walker-&gt;name, 100, FPin) != NULL)
    {
  
   /*Reads in the art*/
     while(fscanf(FPin, "%c", buffer) != '#');
  
     artCount = strlen(buffer);
     buffer[artCount] = '/0';
     walker-&gt;art = (char*)malloc(sizeof(char)*160);
     strcpy(walker-&gt;art, buffer);
  
  /*Reads in the rating*/
  
       fscanf(FPin, "%d", &amp;walker-&gt;rating);
  
     count++;
     walker++;
   } 
  
    fclose(FPin);
    return;
  }
  </code></pre>