file i/o-structs,linked lists

This is a discussion on file i/o-structs,linked lists within the C++ Programming forums, part of the General Programming Boards category; Once again, I need some direction. How can I get a variable from a struct that's in a linked list ...

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    4

    Question file i/o-structs,linked lists

    Once again, I need some direction. How can I get a variable from a struct that's in a linked list to change upon input from the user? I've attached the code I have so far for your reference. Specifically I am referring to the 'bookSale' function. If the user is selling a book, I'd like the quantity to reflect the change that is made to its amount in the file where it has been read. I've tried hacking on it for several hours but came up with nothing workable. Please throw me a bone. Thanks.
    Attached Files Attached Files

  2. #2
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    just change the variable as books are sold/stocked/returned/etc... and if you have it for file io, update that upon program initialization/shutdown... right? also, make sure you have correct access rights to the variables or files you'd want to access... seems pretty straightforward, and looking at your [well organized] code, i would think there is a snag... is there a snag?

    -hth
    hasafraggin shizigishin oppashigger...

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    4

    Thumbs up

    Nope, no snag. I was just having a bit of brain freeze and needed some advice to get me back on track. Thank you very much!

  4. #4
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    oh okay... come here for all your programming needs!!! [of course follow the courtesy rules... and read the you-know-what... ]
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-22-2008, 12:19 AM
  2. Subtle(?) File I/O Problem
    By cecomp64 in forum C Programming
    Replies: 9
    Last Post: 07-16-2008, 12:39 PM
  3. File I/O Question
    By Achy in forum C Programming
    Replies: 2
    Last Post: 11-18-2005, 12:09 AM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. advice on file i/o
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-29-2001, 05:56 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21