C++ Programming
04-14-2009, 01:31 PM
Hi guys,
I have two vectors of string
and I'm looking for an easy way to find the first vector sequence or sub-sequence into the first one
for example:
Vect_1 < "JAVA", "ADA", "C", "C++", "C#">
Vect_2 < "C++", "C#">
search vect_2 sequence in vect_1 will return vect_1 position 3 and match length 2
Vect_1 < "JAVA", "ADA", "C", "C++", "C#">
Vect_2 < "JAVA", "C#">
search vect_2 sequence in vect_1 will return vect_1 position 0 and match length 1
thanks for any idea, suggestion
I have two vectors of string
and I'm looking for an easy way to find the first vector sequence or sub-sequence into the first one
for example:
Vect_1 < "JAVA", "ADA", "C", "C++", "C#">
Vect_2 < "C++", "C#">
search vect_2 sequence in vect_1 will return vect_1 position 3 and match length 2
Vect_1 < "JAVA", "ADA", "C", "C++", "C#">
Vect_2 < "JAVA", "C#">
search vect_2 sequence in vect_1 will return vect_1 position 0 and match length 1
thanks for any idea, suggestion