Pls do help me out.....very urgent!!!!

Discussion in 'Software' started by harish2rock, Mar 2, 2008.

  1. harish2rock

    harish2rock Private E-2

    Hi..Me just a beginner in c++ programming.
    I have come acroos a program which is as follows :
    I have to prepare a file which contains the information in block format. as an example, the file will look like so:

    BEGIN PANELDATA
    BEGIN TITLE
    Panel Method for Saras Analsis.
    Run number 22.
    END TITLE
    END PANELDATA

    this information will be stored in a file. let us call this file SampleInput.dat. our program must scan this information as blocks. we have two blocks in this example. the outermost block has name PANELDATA. this block contain one block named TITLE. title block contains information. in this case the information is stored as multiline text.

    consider another example of an input file. let us call this SampleInput2.dat. It may look like so:

    BEGIN PANELDATA
    BEGIN TITLE
    Panel Method for Saras Analsis.
    Run number 22.
    END TITLE

    BEGIN FLIGHTPARAMETERS
    3
    Mach_number (d) Flight_speed (d) num_Panels (i)
    0.8 1.0 2287
    END FLIGHTPARAMETERS
    END PANELDATA


    in this case, the main block, viz., PANELDATA, has two block in it. the FLIGTHPARAMETERS block contains information. the first entry, viz., 3, tells us that there are 3 entries. the next line shows the names and type of those entries. for instance, the name of the first data is Mach_number and its type is double indicated by (d). similarly, num_Panels is the name of the third entry whose type is integer. the next line contains the numerical values. thus, the FLIGHTPARAMETERS block has more extensive structure. The application should first be able to scan through such files, figure out how many blocks are there and what are their types. if the type of a block is TITLE, then we expect multiline text. if the type of block is FLIGHTPARAMETERS, then we expect number of entries, description of entries and the entries themselves. in the same way, more blocks will be added as we go on.

    So how to do the coding for this ? Me just clueless..
    Pls do help me out...
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds