Thread: Expected expression before char

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    158

    Expected expression before char

    Code:
     #include <stdio.h>
        void instructions_white_single_manual();
        void instructions_white_single_bake();
        double instructions_white_double_manual();
        double instructions_white_double_bake();
       
        void instructions_sweet_single_manual();
        void instructions_sweet_single_bake();
       double instructions_sweet_double_manual();
       double instructions_sweet_double_bake();
        Line 12double calc_baking_time(char bread_type, char loaf, char manual);
       int main()
       {
               char bread_type;
               char loaf;
               char manual;
               printf("Are you making white or sweet bread (w or s)? ");
               scanf(" %c",&bread_type);
      
               printf("Is this a single or double loaf (s or d)? ");
               scanf(" %c",&loaf);
      
               printf("Are you going to bake manually (y or n)? ");
               scanf(" %c",&manual);
      
               if ((bread_type=='w'||bread_type=='W')&&(loaf=='s'||loaf=='S')&&(manual=='y'||loaf=    ='Y'))
               {
                        instructions_white_single_manual();
               }//if
               else//else if
                 if ((bread_type=='w'||bread_type=='W')&&(loaf=='s'||loaf=='S')&&(manual=='n'||loa    f=='N'))
               {
                        instructions_white_single_bake();
               }
               else//else if
                 if ((bread_type=='w'||bread_type=='W')&&(loaf=='d'||loaf=='D')&&(manual=='y'||loa    f=='Y'))
               {
                        instructions_white_double_manual();
               }
               else//else if
               if ((bread_type=='w'||bread_type=='W')&&(loaf=='d'||loaf=='D')&&(manual=='n'||loaf=    ='N'))
               {
                        instructions_white_double_bake();
               }
               else//else if
               if ((bread_type=='s'||bread_type=='S')&&(loaf=='s'||loaf=='S')&&(manual=='y'||loaf=    ='Y'))
               {
                        instructions_sweet_single_manual();
               }
               else// else if
               if ((bread_type=='s'||bread_type=='S')&&(loaf=='s'||loaf=='S')&&(manual=='n'||loaf=    ='N'))
               {
                        instructions_sweet_single_bake();
               }
                  else// else if
               if ((bread_type=='s'||bread_type=='S')&&(loaf=='d'||loaf=='D')&&(manual=='y'||loaf=    ='Y'))
               {
                        instructions_sweet_double_manual();
               }
               else// else if
               if ((bread_type=='s'||bread_type=='S')&&(loaf=='d'||loaf=='D')&&(manual=='n'||loaf=    ='N'))
               {
                        instructions_sweet_double_bake();
               }
                 return 0;
       }
               void instructions_white_single_manual()
       {
               printf("Primary kneading: 15 mins\n");
      
               printf("Primary rising: 60 mins\n");
      
               printf("Secondary kneading: 18 mins\n");
      
               printf("Secondary rising: 20 mins\n");
      
               printf("Loaf shaping: 2 seconds\n");
      
               printf("You should remove the dough for manual baking.\n");
      
    Line 82 calc_baking_time(char bread_type, char loaf, char manual);
       }// instructions_white_single_manual


    I'm trying to call the function calc_baking_time, but i don't see what else is missing?
    bread.c: In function 'instructions_white_single_manual':
    bread.c:82:19: error: expected expression before 'char'
    bread.c:82:19: error: too few arguments to function 'calc_baking_time'
    bread.c:12:8: note: declared here


    i do apoligize for the lines not appearing correctly
    Last edited by tmac619619; 10-23-2012 at 03:01 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. expected expression before ')' token
    By m_programmer in forum C Programming
    Replies: 6
    Last Post: 09-14-2012, 08:02 AM
  2. expected constant expression?
    By GroogFish in forum C Programming
    Replies: 3
    Last Post: 05-08-2012, 12:17 AM
  3. expected primary-expression before ']'
    By ooopa in forum C++ Programming
    Replies: 4
    Last Post: 11-14-2011, 09:35 AM
  4. error: expected an expression
    By cdmstr in forum C++ Programming
    Replies: 3
    Last Post: 02-12-2011, 02:00 PM
  5. expected primary expression
    By mju4t in forum C Programming
    Replies: 2
    Last Post: 03-27-2007, 06:59 PM