Trying to call a function from another file in C with the following code:
main.c
#include "display.h"
int main()
{
display_options();
display_price();
return 0;
}
display.h
int display_options(void);
int display_price(void);
display.c
#include <stdio.h>
int display_options()
{
printf("Welcome to the pizza parlor\n");
printf("What size pizza would you like? (in inches)");
return 0;
}
int display_price()
{
printf("Your pizza will cost 0.00\n");
return 0;
}
I created this following an example here http://www.faqs.org/docs/learnc/x307.html but it doesn't seem to be working i get an error message in codeblocks 10.05 on the function called in main.c saying "undefined reference to 'display_options'"