CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 32

Hybrid View

  1. #1
    Join Date
    Jun 2012
    Posts
    14

    Parse file in vc++

    Please how to parse file in vc++,visual studio 2010 ide.
    parse text file or any simple file, please kindly send me the sample code example. Here I tried with one example but unable to parse...
    please kindly help me asap...

    Thanks & Regards,
    M.G.Rajendra Prasad

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Parse file in vc++

    Please define "parse text file or any simple file"
    Best regards,
    Igor

  3. #3
    Join Date
    Jun 2012
    Posts
    14

    Re: Parse file in vc++

    Quote Originally Posted by Igor Vartanov View Post
    Please define "parse text file or any simple file"
    Please kindly send me how to parse file with example code.
    I am new to vc++.

    I need to parse flash driver,Parse application.
    how the thread concepts implement in vc++.

  4. #4
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Parse file in vc++

    We need more details.
    Basic file I/O can be done using std::ifstream.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  5. #5
    Join Date
    Jun 2012
    Posts
    14

    Re: Parse file in vc++

    Quote Originally Posted by Marc G View Post
    We need more details.
    Basic file I/O can be done using std::ifstream.
    Please kindly send me how to parse file with example code.
    I am new to vc++.

    I need to parse flash driver,Parse application.
    how the thread concepts implement in vc++.

    I am here working on ECU Softwares.

  6. #6
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Parse file in vc++

    I need to parse flash driver,Parse application.
    "Parse" eventually could be anything you can imagine. Explain what this term means for you. Besides, this new formula "parse flash driver" sounds even worse. Total gibberish.

    Please note, if you cannot clearly explain your problem, most probably you won't be helped. So please do your best.
    Best regards,
    Igor

  7. #7
    Join Date
    Jun 2012
    Posts
    14

    Re: Parse file in vc++

    Quote Originally Posted by Igor Vartanov View Post
    "Parse" eventually could be anything you can imagine. Explain what this term means for you. Besides, this new formula "parse flash driver" sounds even worse. Total gibberish.

    Please note, if you cannot clearly explain your problem, most probably you won't be helped. So please do your best.
    Please I need to parse this below txt file in vc++.
    Please kindly do the needful asap.

    >RequestDownload Service...
    >Memory Start Address:F00000 MemorySize: 8152 (001FD8)
    > W 7D3 (8) 10 08 34 F0 00 00 00 00 0.39012 0
    > R 7DB (8) 30 00 00 00 00 00 00 00 317.51842 2
    > W 7D3 (8) 21 1F D8 00 00 00 00 00 0.39195 0
    > R 7DB (8) 02 74 FF AA AA AA AA 00 317.52014 2
    >RequestDownload Service Complete!
    >----------------------------
    > TransferData Service...
    >----------------------------
    >[ Process Record - 1 ]
    > W 7D3 (8) 10 46 36 44 F0 00 00 00 0.44446 0
    > R 7DB (8) 30 00 00 00 00 00 00 00 317.57294 2
    > W 7D3 (8) 21 00 CA FE 00 00 00 00 0.44654 0
    > W 7D3 (8) 22 40 00 00 CC 00 00 00 0.44883 0
    > W 7D3 (8) 23 00 40 00 00 00 40 00 0.44885 0
    > W 7D3 (8) 24 00 00 00 00 00 10 40 0.44887 0
    > W 7D3 (8) 25 00 00 10 40 00 00 10 0.44888 0
    > W 7D3 (8) 26 00 00 00 7C 40 00 00 0.44890 0
    > W 7D3 (8) 27 90 40 00 00 90 00 00 0.44891 0
    > W 7D3 (8) 28 01 F0 40 00 02 80 40 0.44893 0
    > W 7D3 (8) 29 00 02 80 00 00 13 30 0.44894 0
    > W 7D3 (8) 2A F3 00 00 00 00 00 00 0.44900 0
    > R 7DB (8) 01 76 AA AA AA AA AA 00 317.57955 2
    >[ Process Record - 2 ]

    like this Process Record - 129.

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Parse file in vc++

    Quote Originally Posted by Rajendramaraveni View Post
    Please I need to parse this below txt file in vc++.
    "to parse" as what?
    What data do you need to obtain from this file and in what form?
    Victor Nijegorodov

  9. #9
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Parse file in vc++

    Look at CStdioFile and CString::Tokenize().

    Beyond that, without a lot more details from you, I doubt anybody can help much. What part are you stuck on?

  10. #10
    Join Date
    Jun 2012
    Posts
    14

    Re: Parse file in vc++

    Quote Originally Posted by GCDEF View Post
    Look at CStdioFile and CString::Tokenize().

    Beyond that, without a lot more details from you, I doubt anybody can help much. What part are you stuck on?
    Automotive domain file related to ECU.Bootloader file and Application file, flushing this files from hardware which is in .sx file. Please I need parse mentioed above file. Please kindly help me.

  11. #11
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Parse file in vc++

    Quote Originally Posted by Rajendramaraveni View Post
    Automotive domain file related to ECU.Bootloader file and Application file, flushing this files from hardware which is in .sx file. Please I need parse mentioed above file. Please kindly help me.
    I've been doing this 25 years, and that tells me nothing about what you're trying to do. Why are you being so stubborn about explaining what you need help with?

  12. #12
    Join Date
    Jun 2012
    Posts
    14

    Re: Parse file in vc++

    Implement the Parser for bin files which is in the .sx file. Please kindly help me ASAP.
    Motorola S-records

    The general format of an S-record follows:

    +-------------------//------------------//-----------------------+
    | type | count | address | data | checksum |
    +-------------------//------------------//-----------------------+

    -----------------------please below is file need to parse.

    S011000000486578766965772056312E3035D4
    S244008000A500000000008150FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD
    S2440080400000800000008000000000080000804000008040000000C800008108000081080000020C0001000000010000000001000001010000010100000000A800011000CB
    S244008080000110000000E4B00001F4B00001F4B0000000840001F5340001F534000000080001F53C0001F53C000000080001F5440001F544000005800001FAC40001FAC409
    S2440080C00000087000020800400013400000030800020B0840001648000000340000000000000000000000004000000000001340400016800000058440001C0800000424F6
    like this several S-Rec...

  13. #13
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Parse file in vc++

    Quote Originally Posted by Rajendramaraveni View Post
    The general format of an S-record follows:

    +-------------------//------------------//-----------------------+
    | type | count | address | data | checksum |
    +-------------------//------------------//-----------------------+

    -----------------------please below is file need to parse.
    How are these fields delimited?
    Victor Nijegorodov

  14. #14
    Join Date
    Jun 2012
    Posts
    14

    Re: Parse file in vc++

    Implement the Parser for bin files. I mentioned the file above.
    Please anyone kindly help me asap with Implement code also

  15. #15
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: Parse file in vc++

    Quote Originally Posted by Rajendramaraveni View Post
    Implement the Parser for bin files.
    And what could it mean?

    Quote Originally Posted by Rajendramaraveni View Post
    Please anyone kindly help me asap with Implement code also
    It would be no problem to help you if you explained what you need and what you mean by "parser".
    Last edited by VictorN; June 8th, 2012 at 06:01 AM.
    Victor Nijegorodov

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured