So I've been having long nights and extreme headaches over my program. I have my main function which is the menu. Then im adding my entrees as their own thing below that. I am pretty sure i need a function prototype or a function call or something else to fix my problem but im not sure as to what i need to add or take out. I need to get my entrees to return to the main, but it just wont happen. Please help and before you post telling me to us "cout<<" and all of the things related to iostream or whatnot im not able to because of the older versions of c++ we use. Also ive opt outed the code im not using i just want to get the one entree working before i change all of the code. So please help me with getting the biscuits and gravy option to return to main and print there. Thanks in advance.
#include "stdafx.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "iostream.h"
// Function main begins
// program execution
int main() {
int choice = 0 ;
int bill = 0 ;
int drinks = 0 ;
int entrees = 0 ;
int newspaper = 0 ;
int sides = 0 ;
int specials = 0 ;
int takeout = 0 ;
int biscuitsandgravy = 0 ;
int burrito = 0 ;
int waffles = 0 ;
int omelets = 0 ;
int cereal = 0 ;
int eggs = 0 ;
int breakfastsandwich = 0 ;
int pancakes = 0 ;
int bagel = 0 ;
int chorizoandeggs = 0 ;
printf("Welcome to Hashbrowns!\n") ;
printf("What part of the menu would you like to see?\n") ;
printf("1 - Specials\n") ;
printf("2 - Drinks\n") ;
printf("3 - Entrees\n") ;
printf("4 - Newspaper\n") ;
printf("5 - Sides\n") ;
printf("6 - Takeout or Dine in\n") ;
printf("7 - Bill\n") ;
printf("Your decision -> ") ;
scanf("%d",&choice) ;
switch(choice) {
case 1 :
specials++ ;
printf("Specials:\n") ;
break ;
case 2 :
drinks++ ;
printf("Drinks:\n") ;
break ;
case 3 :
entrees++ ;
printf("Entrees:\n") ;
break ;
case 4 :
newspaper++ ;
printf("Newspaper:\n") ;
break ;
case 5 :
sides++ ;
printf("Sides:\n") ;
break ;
case 6 :
takeout++ ;
printf("Takeout?\n") ;
break ;
case 7 :
bill++ ;
printf("Bill:\n") ;
break ;
} // End switch
return choice ;
}
int entrees () {
int choice = 0 ;
int biscuitsandgravy = 0 ;
if(entrees) {
printf("1 - Biscuits and Gravy: $1.50\n") ;
printf("2 - Burrito: $2.50\n") ;
printf("3 - Waffles: $2.00\n") ;
printf("4 - Omelets: $3.25\n") ;
printf("5 - Cereal: $1.99\n") ;
printf("6 - Eggs: $1.00\n") ;
printf("7 - Breakfast Sandwich: $2.99\n") ;
printf("8 - Pancakes: $2.50\n") ;
printf("9 - Bagel: $.50\n") ;
printf("10 - Chorizo and Eggs: $3.00\n") ;
printf("Your decision -> ") ;
scanf("%d", &choice) ;
switch(choice) {
case 1 :
biscuitsandgravy = 0 ; // execute subroutine biscuitsandgravy
printf("Biscuits and Gravy: $1.50\n") ;
break ;
/*
case 2 :
burrito ;
printf("Burrito: $2.50\n") ;
break ;
case 3 :
waffles ;
printf("Waffles: $2.00\n") ;
break ;
case 4 :
omelets ;
printf("Omelets: $3.25\n") ;
break ;
case 5 :
cereal ;
printf("Cereal: $1.99\n") ;
break ;
case 6 :
eggs ;
printf("Eggs: $1.00\n") ;
break ;
case 7 :
breakfastsandwich ;
printf("Breakfast Sandwich: $2.99\n") ;
break ;
case 8 :
pancakes ;
printf("Pancakes: $2.50\n") ;
break ;
case 9 :
bagel ;
printf("Bagel: $.50\n") ;
break ;
case 10 :
chorizoandeggs ;
printf("Chorizo and Eggs: $3.00\n") ;
break ;
*/
} // End switch
} // End Entrees
return choice ;
// Indicates that program ended
// successfully
} // End function main