Here is the file format:

[y][y]      Parameter_Name       Left     Right

[Y]          <BlkNo>    0          
         Profile      0         0
         Ampl     30        30
         Time     36        36

[Y]          <BlkNo>    1
         Profile    0        0
         Ampl    2        2
         Time    0        0


[Y]          <BlkNo>    0
         Blk1_file    0        0
         Blk1_Ampl    5        5
         Blk1_Time    8        8

[Y]          <BlkNo>    1
         Blk1_file    0        0
         Blk1_Ampl    5        5
         Blk1_Time    8        8

[Y]          <BlkNo>    2
         Blk1_file    0        0
         Blk1_Ampl    5        5
         Blk1_Time    8        8

-- 1. checking whether L and R flag is true or false
2.check whether particular parameter name is true or false.
3.check whether each blk under parametername is true or false

the destination file is similar to above file but without [y] -- this flag conditions.

I need to update the destination file with the changes based on conditions in source file.

eg. If left is Y right is N, and param name ForceBlk0 is N, ForceBlk1 is Y,

ignore blks under Param name ForceBlk0
update blk under param name Forceblk1 according to [y] flags appending to <BLK>

Hope i have stated my problem clear and you can understand it.

Kindly please help me. Awaiting reply as soon as possible.

Followup To

Question -
I need to workout on a text file.
This is the format

    Parameters       Left[y]     Right[n]

[y]Looping parameters
  Bonding_K          100          20
  Bonding_Z          11          22
[n]Bonding Sequences
  Lead_1          23          0
  Die          33         12

this file goes in this format. I also have the same kind of destination file without that [y] [n] conditions. I want to change the contents which is indicated by [Y] and should not overwrite that is marked by[n]. For example i need to overwrite the destination file with Left data, particularly for looping parameters and not for bonding sequences.

How to do this? i feel difficulty to code this. Kindly please help me.

Answer -
Of course manipulating a text file is quit easy !
but clearly i can't under stand your expectation! , please state your question clear and simple !

If possible add your code( Specially the structure you using for record) for pin point precision answer !

thank you !

there is lot of concepts upon processing a file , the very essential thing is size of the record and the actual record structure !

in a c/C++ program a record may look like this
struct rec{
  int xxx;
   char yyy;

im asking record  like this and not the contents of the file !

if you send that then nothing hard with that!  


All Answers

Answers by Expert:

Ask Experts


Prince M. Premnath


Years of research in C/C++ Will bring you all facts regarding , OOPS , SVGA , MOUSE , BIOS , IVT , Feel free to query me :-)


More than 5 years


©2017 About.com. All rights reserved.