Thread: Need URGENT and EXTREMELY QUICK help.

  1. #31
    Registered User
    Join Date
    Apr 2008
    Posts
    18
    All done with the reading...now I've been trying to change a value from the FILE (stamina to be more exact). But I can't seem to do a thing, what is it that I'm doing wrong?
    Code:
    fprintf(streamp,"%s %s %d %.2f %d %d", fp.last,fp.name,fp.edad,fp.efectividad,fp.stamina,fp.num);
    This line of code I added a -5 to fp.stamina to see if it would be reduced by 5, but it wouldn't do anything. So, any suggestions?

  2. #32
    Registered User
    Join Date
    Apr 2008
    Posts
    18
    Bump? o.O

  3. #33
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    This line of code I added a -5 to fp.stamina to see if it would be reduced by 5
    so you mean
    Code:
    fprintf(streamp,"%d %d", fp.stamina,fp.stamina-5);
    prints the same number twice? I doubt it...
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  4. #34
    Registered User
    Join Date
    Apr 2008
    Posts
    18
    No I mean, if fp.stamina was 100, I got fp.stamina-5 = 95 stamina.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Urgent Programming Problem
    By mchap1643 in forum C Programming
    Replies: 5
    Last Post: 10-16-2003, 08:54 AM