Well, there are a couple of problems. One is your scanf. You have the user enter a number between 1 and 7, but it stores that input into nameOfDay. Your if statement is taking action based on the...
Type: Posts; User: xxc0dephr34kxx
Well, there are a couple of problems. One is your scanf. You have the user enter a number between 1 and 7, but it stores that input into nameOfDay. Your if statement is taking action based on the...
Ah, my mistake. However, your scanf should be
scanf("%s", name);
The name of an array is pointing to an address, so you wouldn't need the address of operator (&).
FILE *ptr;
// open the file ".txt" for reading
ptr = fopen("comp.txt", "r");
Looking at your code, I don't see where you are asking the user to input a file name, and I don't see where...
Your wanting to use name[20] as a file name correct? If so what is wrong here?
ptr = fopen("comp.txt", "r");
search = fopen("kristina.txt","r");
You still have fopen hard coded...
Your problem is in your array initializations.
char *menu[] = {"press 1 for Plain Burger\npress 2 for Cheese Burger\npress 3 for Ketchup Burger\npress 4 for Plain VegiBurger\npress 5 for...
Don't know if this is going to fix your problem, but the error may be in your burger_switch function (line 53). You have a global variable "int x" (line 12) and local variables "int x" (lines 17 and...