Search:

Type: Posts; User: mammoth

Search: Search took 0.00 seconds.

  1. Replies
    16
    Views
    14,765

    I'm been omitting the report() function because...

    I'm been omitting the report() function because there has been no fault in it. Yea, "deleted" records are not displayed via if (prodtype != 0) in the report. What I displayed above was an undeleted...
  2. Replies
    16
    Views
    14,765

    I like the random access idea, but for some...

    I like the random access idea, but for some reason when I fwrite to the record, it stores all sorts of weirdness as well as the value zero to mark it as "deleted."

    Here's what I tried instead of...
  3. Replies
    16
    Views
    14,765

    So, winning combination: fopen using r+b...

    So, winning combination:
    fopen using r+b
    fseek(bf,0-sizeof(recs),SEEK_CUR)
    fflush(bf)

    Thanks everyone for the help! Here's the finished function for forum completeness:


    void...
  4. Replies
    16
    Views
    14,765

    Ha! w+b is bad if I want to keep my binary file...

    Ha! w+b is bad if I want to keep my binary file data. There's an aptly placed TNT detonator icon in my text for that mode. It truncated my file nice and clean! =)
    ...
  5. Replies
    16
    Views
    14,765

    Quzah: Thanks, I overlooked void and my fopen...

    Quzah: Thanks, I overlooked void and my fopen mode in this function. As far as checking for a return value, do you mean this?:
    if (bf == NULL)
    {
    printf("Cannot open file in report:...
  6. Replies
    16
    Views
    14,765

    Read binary, change a value, write to binary

    Goal:
    Read and display sets of data in a binary file in struct format. Prompt for the set to be "deleted" (that is, change a value to zero). Then write that value back to the binary file.
    ...
  7. Replies
    3
    Views
    22,188

    Flippin' sweet! For some reason I read fscanf as...

    Flippin' sweet! For some reason I read fscanf as only returning a count of values, rather than assigning them as well. In this instance, I had 10 values in a "min max" syntax on 5 lines in the text...
  8. Replies
    3
    Views
    22,188

    Obtain space separated values from text file

    Hello, I have been struggling with this idea for a while and cannot seem to master it.

    I need to open a text file, obtain space separated values, then refer to them in later functions. The idea...
Results 1 to 8 of 8