title: invalid conversion from 'char*' to 'char' [-fpermissive]
body: <p>i want to make cashier program by C language. i using structure for record but the problem is when i try to display the receipt of payment by defined name of item <code>detail[i].name</code> and price <code>detail.[i].price</code> for looping, i got this message </p>
  
  <blockquote>
    <p>[Error] invalid conversion from 'char*' to 'char' [-fpermissive]</p>
  </blockquote>
  
  <p>this is my script</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
      struct item{
          char name[10];
          int price;
          int barcode;
      };
      struct item detail[10]={
          "item1",10,1,
          "item2",20,2,
          "item3",30,3,
          "item4",40,4,
          "item1",50,5,
          "item2",60,6,
          "item3",70,7,
          "item4",80,8,
          "item3",90,9,
          "item4",100,10
      };
      int main(){
          int ibarcode[10];int qty[10];char b[10];int price[10];int ju[10];int tot[10];
          int j,i,k,grand;
          char a;
          printf("Cashier program\n");
          for(j=0;j&lt;10;j++){
              printf("enter barcode : ");scanf("%d",&amp;ibarcode[j]);
              for(i=0;i&lt;10;i++){
                  if(ibarcode[j]==detail[i].barcode){
                      printf("item name: %s\n",detail[i].name);
                      printf("price : %d\n",detail[i].price);
                      printf("Quantity : ");scanf("%d",&amp;qty[j]);
                      tot[j]=detail[j].price*qty[j];
                  }
                 if(ibarcode[j] &gt; 10){
                      printf("Barcode not valid\n");
                      j--;
                      break;
                 }
              }
              printf("\nDo you want to buy again? [Y/N] = ");scanf("%s", &amp;a);
              b[j] = detail[i].name;
              ju[j] = detail[i].price;
              if(a=='Y'||a=='y'){
                 continue;
              } else {
                 break;
              }
          }
          grand = 0; system("cls");
    printf("\n name Kasir = Addzifi Moch G\n");
    printf(" Tanggal    = 03 januari 2017\n");
    printf(" Jam        = 14:05 WIB\n\n");
    printf("+-------------------------------------------------------------------------------------------------+\n");
    printf("| Barcode | name item\t\t\t| price \t\t| Quantity\t| Total   |\n");
    printf("+-------------------------------------------------------------------------------------------------+\n");
   for(k=0; k&lt;=j; k++){
    grand += tot[k];
    printf("|    %d \t  | %s\t                | %d\t\t       | %d\t\t\t| %d |\n", ibarcode[k], b[k], ju[k], qty[k], tot[k]);
   }
   printf("+-------------------------------------------------------------------------------------------------+\n");
   printf("|\t\t\t\t\t\t\t  Total Yang Harus Dibayarkan  =  %d |\n", grand);
   printf("+-------------------------------------------------------------------------------------------------+\n");
  }
  </code></pre>