On 4/2/07, Thomas Hruska <[EMAIL PROTECTED]> wrote: > > 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. > > This would be _significantly_ easier and faster if you used C++. Doing
I want to know how can we do it easily in C++. If its using maps, i would like to know how do we use maps or any other stl to do it. what you want is either going to be performance-unfriendly (as Nico's > suggestion pointed out) OR is going to be very time-consuming coming up > with an optimal solution. Any chance you'll switch languages? > > -- > Thomas Hruska - Vijay Shankar [Non-text portions of this message have been removed]
