string searching algorithm......help

This is a discussion on string searching algorithm......help within the C Programming forums, part of the General Programming Boards category; I can't programming this algorithm(Brute-Force Algorithm, KMP Algorithm, Boyer-Moore Algorithm)
How to program this algorithm ?
help me!...

Try to implement first the simpliest method.
Boyer-Moore can wait, and you don't need such advanced techniques until you're searching in huge files.

The algorythm is this simple:

Search for the first character of your string in the target.
if found, check whether second character from the search string matches the second character from target string, and so on, for th é whole length of the searched string. If all chars match, you're done, return strings index from the tartget. Else, continue the search. You can even modify the algorythm to find all occurences of the given string if needed.

// note: this is just a draft version I typed in here quickly
// might not compile ;°), just to give you an idea