Search:

Type: Posts; User: GCWilkins

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    4,563

    Solved

    Big thanks to all of you!
    I finally solved my problem by changing the way data is written to the file:
    I made sure it always had three digits and then used fseek() to point to SEEK_END - 3. fscanf...
  2. Replies
    11
    Views
    4,563

    From your quote: I have tried changing...

    From your quote:
    I have tried changing everything to "Total sencillos = %d" and also to "Total sencillos=%d", with no luck
  3. Replies
    11
    Views
    4,563

    Seriously, I'm gonna end up in a madhouse! This...

    Seriously, I'm gonna end up in a madhouse!
    This is my function:


    int get_data(FILE *pf){
    int data=0;
    char line[CHAR];
    char last_line[CHAR];
    char empty_line[CHAR]="\n";
    ...
  4. Replies
    11
    Views
    4,563

    Thank you both, I now understand how the function...

    Thank you both, I now understand how the function works, but I'm still fighting with the isBlank() condition:

    Then,
    if(line!="\n") should do the trick, right?
    I've tried it but I don't get the...
  5. Replies
    11
    Views
    4,563

    I'm sorry but, being a novice, i don't quite...

    I'm sorry but, being a novice, i don't quite understand your code there.
    I assume it looks for the last written line, copies it to another string and then uses sscanf to identify the integer
    Evenif...
  6. Replies
    11
    Views
    4,563

    Accessing int at end of file

    Hi, I'm learning to use files in C and I was wondering how to access an integer at the end of a text file.
    The file has some strings before, and the last line should be:

    Output=6

    I'd like to...
Results 1 to 6 of 6