title: Invalid conversion from 'char*' to 'char [-fpermissive]
body: <p>I'm new to C..so, please bear with me.. I want to call function printReceipt(char, char, char) in function calculatePrice(char), but it said that there's an error for invalid conversion from char to char at the function call for printReceipt. Can anyone please help me?</p>
  
  <pre><code>double calculatePrice(char cust)        //calculate total price for each customer and return the value
  {
      char code[5], size, top;
      double discount, drPrice, topPrice, price;
  
  
      printf("\n\t\t\t\tEnter the order's code :");
      scanf("%s", code);
  
      printf("\n\t\t\t\tEnter size of cup : ");
      scanf(" %c", &amp;size);
  
      printf("\n\t\t\t\tEnter topping : ");
      scanf(" %c", &amp;top);
  
  
  
      if((strcmp(code, "T1")==0) || (strcmp(code, "T2")==0) || (strcmp(code, "T3")==0) ||(strcmp(code, "T4")==0) || (strcmp(code, "T5")==0))  //drinks code
      {
          if(size == 'R')
              drPrice = 4.90;
          else if(size == 'L')
              drPrice = 5.90;
      }
  
      if((strcmp(code, "CH1")==0) || (strcmp(code, "CH2")==0) || (strcmp(code, "CH3")==0) || (strcmp(code, "CH4")==0) || (strcmp(code, "CH5")==0))    //drinks code
      {
          if(size == 'R')
              drPrice = 6.90;
          else if(size == 'L')
              drPrice = 7.90;
      }
  
      if((strcmp(code, "C2")==0) || (strcmp(code, "C3")==0) || (strcmp(code, "C5")==0))   //drinks code
          drPrice = 5.90;     
  
      if((strcmp(code, "S1")==0) || (strcmp(code, "S2")==0) || (strcmp(code, "S5")==0) || (strcmp(code, "S7")==0) || (strcmp(code, "S9")==0)) //drinks code
          drPrice = 6.90;
  
      if((strcmp(code, "S3")==0) || (strcmp(code, "S4")==0) || (strcmp(code, "S6")==0) || (strcmp(code, "S8")==0) || (strcmp(code, "S10")==0) || (strcmp(code, "S11")==0))    //drinks code
          drPrice = 5.90; 
  
      if(strcmp(code, "C1") == 0)     //drinks code
          drPrice = 3.90;
  
      if(strcmp(code, "C4") == 0)     //drinks code
          drPrice = 4.90;
  
      if(top == 'B' || top == 'G' || top == 'J' || top == 'P' || top == 'A')      //topping type
          topPrice = 0.60;
  
      if(top == 'X')      //if no topping is selected
          topPrice = 0.00;
  
      if(cust == 'M')     //customer type
          price = 0.8 * (topPrice + drPrice);         
  
      else if(cust == 'S')    //customer type
          price = 0.85 * (topPrice + drPrice);    
  
      else if(cust == 'R')    //customer type
          price = topPrice + drPrice; 
  
      printReceipt(code, size, top);
  
      return price; //return value
  }
  
  
  void printReceipt(char code, char size, char top)
  {
      FILE *f = fopen("receipt.txt", "w");
  
      if(f == NULL)
      {
          printf("Error opening file!\n");
          exit(1);
      }
  
      fprintf(f, "bla bla bla");
  
  
      fclose(f);
  }
  </code></pre>