CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Join Date
    Oct 2010
    Posts
    106

    Re: compare two files

    OK Philip Nicoletti thanks a lot. Let me try this.

  2. #17
    Join Date
    Oct 2010
    Posts
    106

    Re: compare two files

    it worked. Thanks Philip . I have also written a code which output the same thing as is output by yours BUT it is a LONNGG code. Yours is so simple.

    the output:

    Code:
    0:GRC,GE,201009,FUT,XGGRC,0G4LHZ013,14ijpol1vsu7l7,Fill,0000D9DB,B,00000,99.155,2,99.155,20100601,07:27:34
    is there anyway I can find "how many and what are" the lines that are written more than once (can be any number) against each line ID. Where as line ID is the string right before the first colon ( : ).

    For example how many of these lines (string below) are written against the ID zero and so on for each ID because then I will decide, based on certain condition, which line of the duplicates to select and put in another file which would contain just unique values.

    Code:
    GRC,GE,201009,FUT,XGGRC,0G4LHZ013,14ijpol1vsu7l7,Fill,0000D9DB,B,00000,99.155,2,99.155,20100601,07:27:34
    If a line has no duplicates at all then this line should straight away be written to the file which will store unique lines

    Many Thanks again

Page 2 of 2 FirstFirst 12

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