Search:

Type: Posts; User: GCWilkins

Search: Search took 0.00 seconds.

  1. Replies
    11
    Views
    4,544

    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,544

    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,544

    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,544

    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,544

    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,544

    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...
  7. Replies
    3
    Views
    2,537

    The different treatment of user.phone is just a...

    The different treatment of user.phone is just a result of me trying to blindly fix the error. Originally, it was defined and treated as a string throughout the program.
    Thanks for your help, I found...
  8. Replies
    3
    Views
    2,537

    File I/O logic error

    Hi,
    I'm quite a newbie around C, and I am trying to make a program that, among other things, asks the user for his name, surname and telephone number and saves it to a file.
    I've managed to save...
Results 1 to 8 of 8