Search:

Type: Posts; User: xxc0dephr34kxx

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,848

    Well, there are a couple of problems. One is your...

    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...
  2. Ah, my mistake. However, your scanf should be ...

    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 (&).
  3. FILE *ptr; // open the file ".txt" for...

    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...
  4. Your wanting to use name[20] as a file name...

    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");
  5. You still have fopen hard coded...

    You still have fopen hard coded...
  6. Replies
    22
    Views
    19,271

    Your problem is in your array initializations. ...

    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...
  7. Replies
    22
    Views
    19,271

    Don't know if this is going to fix your problem,...

    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...
Results 1 to 7 of 7