Thread: File operations

  1. #1
    Registered User
    Join Date
    Jan 2003

    Lightbulb File operations

    hi ,
    the enteries i need to make in the Text file are

    S.No Tagname(7char) Description(14char) State

    1. FCLT01 THis is blah blah.
    2048 . vvvv xxxxxxxxxxxxx.

    Out of the above only STATE is changed dynamically rest all information is static but the goes from 1 to 2048.
    So could anyone tell me how should i proceed as the static entries are a lot.

    thanks in advance

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Does the file exist with all the static values already defined?

    If so, your program could
    define a structure with the State, Tagname, Description defined, define an array of the structures, then read the file.

    Change the state numbers and write teh file.


    By the way, Salem, I think CP means by 'static' that the description and tagname are pre-defined and not to be changed.

  3. #3
    Registered User
    Join Date
    Jan 2003


    Yeah by Static i mean the information is not changed only State is changed .

    The file does not exist i just need to write the static info( TAG DEscription) if the state(0 or 1) is changed for the corresponding, and keep on appending the information.

    so there are 2048 S.nos and every S.No can have 2 states (0 or 1) and for 0 there is one TAG and DESCRIPTION and for 1 there is diff TAG and DESCRIPTION.

    any suggestions(an example of sorts would be great).

    Last edited by coo_pal; 05-16-2003 at 02:04 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File being filled with NULLs
    By Tigers! in forum Windows Programming
    Replies: 2
    Last Post: 06-30-2009, 05:28 PM
  2. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  3. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM