pushkar raj wrote: > Hi everybody, > > I have two text files. One of them contains a sequence of character > terminated by newline. File 1 > for eg.....gnlase#5678940 > gnlase#3421667 > ..................... and so on. > > The other file also contains a sequence of character which may begin with > above string. After each sequence there is sequence of character which > describes the above string. File 2 > for eg........ gnlase#5647120 > a sequence of character which describes above string. > >gnlase#543271 > a sequence of character describing above string. > >...... and so on. > I need to find the match the string pattern from file 1 with string pattern > of file 2, if they are same then i need to copy the description of that > string in another file say File 3. > > Each string pattern in file 2 begins with a '>' character which is followed > by description which runs in several lines. > Please suggest a solution to this problem using C++ code. > please help me...its urgent, the C procedure is not efficient at all.
IIRC, someone (perhaps me) already gave a possible C++ solution along with several optimization paths for the C route. Search the archives for the group. It would help to remind the group on how big the input files are. -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* VerifyMyPC 2.5 Change tracking and management tool. Reduce tech. support times from 2 hours to 5 minutes. http://www.CubicleSoft.com/VerifyMyPC/
