S
spoilsport
Ive got to write a multi-function program and I'm plugging in the
functions but I keep getting this error from line 40. Im new to this
and cant find an answer anywhere.
Sam
#include <stdio.h>
int main (void)
{
void top_of_page_info (void);
void print_item_info (char item_name, double item_price);
char item_name[15], name;
double item_price;
printf ("\n\nPlease enter the name of the item: ");
scanf ("%s", & item_name);
printf ("\n\nPease enter the price of the item: $");
scanf ("%f", & item_price);
top_of_page_info ();
print_item_info (item_name, item_price); /***LINE 40***/
return 0;
}
/*******BEGIN TOP_OF_PAGE_INFO
FUNCTION**************************************/
void top_of_page_info (void)
{
printf ("\n\n PROGRAM DESCRIPTION\n");
printf (" by\n");
printf (" YOUR NAME HERE\n");
printf (" Date Written: DDMMMYY\n");
printf ("------------------------------------------------------\n\n");
}
/*******BEGIN PRINT_ITEM_INFO
FUNCTION**************************************/
void print_item_info (char item_name, double item_price)
{
printf ("\n\nThe item name is %s\n", item_name);
printf ("The item price is %f\n", item_price);
}
/*************************************************************************************************/
functions but I keep getting this error from line 40. Im new to this
and cant find an answer anywhere.
Sam
#include <stdio.h>
int main (void)
{
void top_of_page_info (void);
void print_item_info (char item_name, double item_price);
char item_name[15], name;
double item_price;
printf ("\n\nPlease enter the name of the item: ");
scanf ("%s", & item_name);
printf ("\n\nPease enter the price of the item: $");
scanf ("%f", & item_price);
top_of_page_info ();
print_item_info (item_name, item_price); /***LINE 40***/
return 0;
}
/*******BEGIN TOP_OF_PAGE_INFO
FUNCTION**************************************/
void top_of_page_info (void)
{
printf ("\n\n PROGRAM DESCRIPTION\n");
printf (" by\n");
printf (" YOUR NAME HERE\n");
printf (" Date Written: DDMMMYY\n");
printf ("------------------------------------------------------\n\n");
}
/*******BEGIN PRINT_ITEM_INFO
FUNCTION**************************************/
void print_item_info (char item_name, double item_price)
{
printf ("\n\nThe item name is %s\n", item_name);
printf ("The item price is %f\n", item_price);
}
/*************************************************************************************************/