Read binary file with line delimeter
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 156

Thread: Read binary file with line delimeter

Threaded View

  1. #11
    Join Date
    Oct 2013
    Posts
    63

    Re: Read binary file with line delimeter

    Quote Originally Posted by 2kaud View Post
    For the first 2 strings, does the 'f' always appear at the end of the string, or can 'f' appear anywhere in the string? Is it just the 'f' at the end you don't want or 'f' that appears anywhere within this 16 bytes?

    PS I think the 'f' always only appears at the end. Can you confirm.

    PPS In the preliminar output does it start with a '|' and the various parts separated by '|'?
    Hello 2kaud,

    Yes, the "f's" are used to fill the substrings when the 16 bytes are not completely occupied by numbers (0 to 9), then the "f's" appear always from rigth to left of each substring and could appear one or more "fs".

    Instead of use "," as utput separator, the "|" is only the separator I'd like to use in the output.

    I've tested the code and the output with small file I've uploaded in previous post and I get:
    Code:
    1,|532064450189340|81474549232|,0015000A48
    2,|532064450189341|81474554768|,0015000A48
    3,|532064450189342|81474557521|,0015000A48
    4,|532064450189348|81477380427|,0015000A48
    5,|532064450189349|81474663128|,0015000A48
    where the first column is block number, 2nd column is first string, 3rd column is 2nd string, but is appearing a 4th column that is not supposed to appear. The 4th column should be the first substring of the sub-block if exist.

    So, if only first 2 strings are processed currently, the output expected is:
    Code:
    1|532064450189340|81474549232
    2|532064450189341|81474554768
    3|532064450189342|81474557521
    4|532064450189348|81477380427
    5|532064450189349|81474663128
    Thanks for the help 2kaud.
    Last edited by Philidor; October 27th, 2013 at 12:43 PM.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center