title: expected ‘const char * __restrict__’ but argument is of type ‘int’
body: <p>I saw few threads about it but still no clue how to fix that error. The thing is:</p>
  
  <pre><code>    char *data;
      char chat;  
      snprintf(chat,"%d",getc(file));//error here
      printf("\Variable %c",chat); // here is still valid
      strncpy(data, chat, SHM_SIZE); //error here
  </code></pre>
  
  <p>Please help :)</p>
  
  <p>sprintf - gives error (int to char conversion);
  atoi/itoa - not working :/</p>
  
  <p>Edit: @iharob
  thank you! i still have a problem....</p>
  
  <pre><code>   strncpy(data, "a", SHM_SIZE); //is totally working
  </code></pre>
  
  <p>but </p>
  
  <pre><code> char chat[SHM_SIZE];  
      snprintf(chat, sizeof chat, "%d",getc(file));
      printf("Variable %c\n", chat);//showing nothing or some weird signs
  </code></pre>
  
  <p>weird because</p>
  
  <pre><code>printf("Character : %c",getc(file)); //shows everything ok
  </code></pre>