Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What code will look for searching substring in string?
Posted
Comments
[no name] 10-Apr-14 10:36am    
Why don't you just use string::find?

1 solution

There are a large number of ways to find the first occurrence of one string within another, and Wiki provides a list of the most common algorithms: http://en.wikipedia.org/wiki/String_searching_algorithm[^] - together with explanations of how they work.

From that, you should be able to complete your homework with no further help...
 
Share this answer
 
Comments
novadivlja 11-Apr-14 3:03am    
thnx
OriginalGriff 11-Apr-14 4:44am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900