Recent content by dudforreal

  1. D

    Opening a Binary File in Command

    I have 6 options in my code and it does create a binary file in my project folder when I press 4 but when I press 5 it doesn't work. printf("1. Add a car to the fleet.\n"); printf("2. Delete last car from the fleet.\n"); printf("3. Display full fleet on the screen.\n"); printf("4. Save...
  2. D

    Opening a Binary File in Command

    My program on Pelles C is creating a binary file when I want the results to save to a file but I'm not sure on how to open the binary file in cmd in Pelles C so that it is readable and I can read it.
  3. D

    Opening a Binary File in Command

    fopen is working void readFleet(Car_t toRead[]) { FILE *fFleet; fFleet = fopen("Fleet_File.bin", "rb"); fread(toRead, 10*sizeof(Car_t), 1, fFleet); fclose(fFleet); }
  4. D

    Opening a Binary File in Command

    How do you open a binary file in command in Pelles C so that it is readable?
  5. D

    Nested if statement within a do-while loop

    So through boolean, !x is testing x=1 and not the starting x=0?
  6. D

    Nested if statement within a do-while loop

    How come the boolean is unchanged, isn't it changed in the two tables?
  7. D

    Nested if statement within a do-while loop

    why are we only checking for x? what do you mean by modified?
  8. D

    Nested if statement within a do-while loop

    Can you elaborate further so don't quite understand, isn't 1 true?
  9. D

    Nested if statement within a do-while loop

    if 0 is false then !false is true which is 1 and it will repeat the loop?
  10. D

    Nested if statement within a do-while loop

    I'm just curious why this code will work because it was part of a larger code and x was used as a check. When we got the desired result, x=1, wouldn't "!x" repeat the loop when we don't want it to repeat so to exit the loop?
  11. D

    Nested if statement within a do-while loop

    From my code I want to check if the amount is less than 100 and to do this I use x to check, which I saw from the answer to a similar question
  12. D

    Nested if statement within a do-while loop

    I don't understand why this would work, shouldn't it be "while(x)" because we don't want to repeat the loop? int main(void) { int x=0; do { printf("Enter an amount:\n"); scanf("%lf", &amount); if (amount < 100) x=1; else printf("Invalid"); }while(!x); return 0; }
  13. D

    C programming compiling syntax errors

    read and save to file still not working on code blocks any suggestions?
  14. D

    C programming compiling syntax errors

    i already fixed that issue thanks... the problem is that the read and save to file option still doesn't work even on Code Blocks
  15. D

    C programming compiling syntax errors

    i got the compiling to work but read and save to file still don't work on code blocks any suggestions?
Back
Top